how to set required fields