We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something like:
const hotelFormValidationConstraints: ValidationConstraints = { fields: { name: [{ validator: Validators.required }], city: [], } };
Will produce an undefined FieldValidationResult, e.g.:
<DropdownForm name="city" label="city" onChange={onFieldUpdate} value={hotel.city} list={cities} error={formErrors.city.errorMessage} />
Uncaught (in promise) TypeError: Cannot read property 'errorMessage' of undefined
Workaround:if a given field has no validation check for undefined
const onFieldUpdate = (id : keyof HotelEntityVm, value : any) => { setHotel({ ...hotel, [id]: value }); hotelFormValidation.validateField(hotel, id, value).then( (fieldValidationResult) => { + if(fieldValidationResult) { setHotelFormErrors({ ...hotelFormErrors, [id]: fieldValidationResult }); + } } )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Something like:
Will produce an undefined FieldValidationResult, e.g.:
Uncaught (in promise) TypeError: Cannot read property 'errorMessage' of undefined
Workaround:if a given field has no validation check for undefined
The text was updated successfully, but these errors were encountered: