

The minimum value allowed as the value for the input. If invalid, the tooLong error will be displayed. The maximum length allowed of the input value. If invalid, the rangeOverflow error will be displayed. The maximum value allowed as the value for the input. In addition to all the FieldProps that you can pass to the standard Field, to an HTML5 Validation Field, you may also pass: Rules max?: Number The value does not match the specified type The value does not match the step granularity The value does not match the regular expression

Import from 'react-final-form-html5-validation' const MyForm = ( ) => ( ( First Name This version of Field is a thin wrapper over the official Field component, and the only Field API that this library uses/overrides is the field-level validate prop, so even if you are using this library's Field component, you will still get improvements as features are added to the 🏁 React Final Form library in the future. Therefore it makes sense to make this a separate package. The reason is that not everyone needs this functionality, and not everyone is using 🏁 React Final Form with the DOM (e.g. Why not add this functionality directly into the officially bundled Field component?

Unfortunately, this functionality is not compatible with 🏁 React Final Form record-level validation, so the two should not be mixed. The bindings are two-way because any HTML5 contraint validation errors will be added to the 🏁 Final Form state, and any field-level validation errors from 🏁 Final Form will be set into the HTML5 validity.customError state. 🏁 React Final Form HTML5 Validation is swappable replacement for 🏁 React Final Form's Field component that provides two-way HTML5 Validation bindings.
