Releases: NewOrbit/not-valid
Releases · NewOrbit/not-valid
v2.0.0
Changes validLength
to be consistent with the other validators such that it will pass if no value is provided.
This is a breaking change if your field is required but can easily be resolved by inserting the requiredString
validator before it:
import { validators } from "not-valid";
...
<Input.Text
- validation={[validators.validLength({ min: 3, max: 10 })]}
+ validation={[validators.requiredString(), validators.validLength({ min: 3, max: 10 })]}
/>