You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the following Form component with the firstName field set to undefined and lastName set to ''.
<divclassName="container-fluid"><Formvalidator={validator}schema={schema as any}showErrorList={false}noHtml5ValidateuiSchema={{}}customValidate={undefined}formData={{firstName: undefined,lastName: ''}}omitExtraData={false}/></div>
firstName is recognised as a required field validation error, but lastName is not:
Expected Behavior
Any field with an initial formData value of '' should trigger validation of required fields.
dagda1
changed the title
formData with an empty string is not flagged as a validation error message
formData with an empty string is not flagged as a validation required field error message
Dec 19, 2022
Prerequisites
What theme are you using?
material-ui
Version
^5.0.0-beta.14
Current Behavior
With the following schema:
And the following
Form
component with thefirstName
field set toundefined
andlastName
set to''
.firstName
is recognised as a required field validation error, butlastName
is not:Expected Behavior
Any field with an initial
formData
value of''
should trigger validation of required fields.Steps To Reproduce
git clone git@github.com:dagda1/rjsf-example-5.git
yarn install
yarn start
I tried to create this codesandbox but I get the following error which does not happen when running the code outside codesandbox.
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: