replaced direct access to field['required'] with a getter