added ability to set required fields