A numeric field pattern can block a submit before RJSF validates it
Detect
- In your data: legacy or server values that aren't numbers loaded into a
number/integerfield. - On the rendered page: submitting shows the browser's own "Please match the requested format" message on the field, and neither
onSubmitnoronErrorruns.
Change
The numeric field is now a text input with a pattern (see Number and integer fields render a text input), so native constraint validation blocks a submit whose value doesn't match, and the browser shows its message instead of an RJSF error. To make RJSF's validation the only validator, set noHtml5Validate:
-<Form schema={schema} validator={validator} />
+<Form schema={schema} validator={validator} noHtml5Validate />
Verify
- Submitting the bad value calls
onErrorand shows RJSF's type error on the field.
Also read: