4.14 date and number field validation broken

1001
3
02-05-2020 10:16 AM
Stacy-Rendall
New Contributor III

Editing Date fields through either FeatureForm or Editor widget is broken because the API treats a null value as valid date/number, even if the field is specified as required and has a RangeDomain. Docs: FieldConfig | ArcGIS API for JavaScript 4.14 

This means that when creating a new feature the user can just "click through" date/number fields without entering anything (recorded as a null) (or if editing, deleting the existing values) and the API will accept this null value as valid.

Should FieldConfig support a nullable (boolean) option?

0 Kudos
3 Replies
HeatherGonzago
Esri Contributor

Stacy,

Could you clarify further what you are experiencing? Maybe a test app showing the problem. I have one set up on my end, with date and number fields configured on the server to not allow NULL values. If I remove a value and proceed to the next field input, I always get a warning within the FeatureForm indicating that it needs a valid input.

Stacy-Rendall
New Contributor III

Thanks Heather, applying on the server sounds like it should fix, I will test.

However, my original issue still stands: specifying required and RangeDomain in the FieldConfig is not working for number and date fields because "null" is considered valid

0 Kudos
Stacy-Rendall
New Contributor III

Hello Heather,

do you have any further update? As I said below: my original issue still stands: specifying required and RangeDomain in the FieldConfig is not working for number and date fields because "null" is considered valid

Regards,

Stacy

0 Kudos