Any ideas why a date field’s `required` attribute would not be enforced in FormBuilder?
Created 5 years ago by ericleversen

I have two fields defined in a formbuilder: location and reminder_start_date. Both are required and show an asterisk indicating such on the form but only location is showing an error when an empty form is submitted.

Any ideas why? Thoughts on where to start troubleshooting this?

 'location' => [
            'type'   => 'anomaly.field_type.relationship',
            'config' => [
                'related' => 'Farmtowork\FarmtoworkModule\Location\LocationModel',
                "handler" => \Farmtowork\FarmtoworkModule\Location\Support\LocationOptionHandler::class
            ],
            'required'  => 'true',
        ],
'reminder_start_date' => [
            'label'         => 'Start Date',
            'type'   => 'anomaly.field_type.datetime',
            'required'  => 'true',
        ],
ericleversen  —  5 years ago

Need to use 'required' => TRUE,, not 'required' => 'true',

[rubber_duck]