Yup v0.31.0 Release Notes

Release Date: 2020-11-23 // over 3 years ago
  • 🐛 Bug Fixes

    🔋 Features

    • ➕ add array.length() and treat empty arrays as valid for required() (fbc158d)
    • ➕ add object.pick and object.omit (425705a)
    • 🗄 deprecate the getter overload of default() (#1119) (5dae837)
    • more strictly coerce strings, exclude arrays and plain objects (963d2e8)

    💥 BREAKING CHANGES

    • array().required() will no longer consider an empty array missing and required checks will pass.

    To maintain the old behavior change to:

    array().required().min(1)
    
    • plain objects and arrays are no long cast to strings automatically

    to recreate the old behavior:

    string().transform((_, input) => input != null && input.toString ? input.toString() : value);