You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Object.schema({ schema, returnErrors }) signature is now Object.schema(schema, { returnErrors }) (old syntax is still accepted)
Breaking Changes
All tests (and .custom()) must return either a boolean or a valid object { isValid, error }.
This allow returning custom error and argument to change the error message and be more strict about what is a succesful test.
If your custom() call is returning something else (string, number ...) an error will be thrown.