Packages

yup

1.7.1 · 21 Sep 2025MIT16.7M / weekRepositorynpmAtom feed

Your version

0.7.0

21 Apr 2015Where it was published

0.32.11 is the newest release of 0.7.x.

In short

2 new3 changed

Release note

breaking

  • The validation() method has been renamed to test() and has a new signature requiring a name argument

  • Exclusive validations now trump the previous one instead of defering to it e.g: string().max(10).max(15) has a max of 15 instead of 10

other changes

  • Expose advanced signature for custom validation tests, gives finer grained control over how tests are added

  • Added the abortEarly (default: true) option

  • Transforms are passed an addition parameter: 'originalValue' you allow recovering from a bad transform further up the chain (provided no one mutated the value)