Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@hisuwh hisuwh released this 07 Jun 14:46
· 2 commits to master since this release

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