Skip to content

Releases: NewOrbit/not-valid

v2.0.0

07 Jun 14:46
Compare
Choose a tag to compare

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 })]}
/>