We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
abortEarly: false
Describe the bug
array.min does not throw any error when abortEarly: false option is specified.
array.min
To Reproduce RunKit: https://runkit.com/lench/yup-array-validation
const Yup = require("yup"); const { expect } = require("chai") const schema = Yup.object().shape({ items: Yup.array() .of(Yup.string()) .min(1, 'must-have-one-item'), }); const value = { items: [], }; try { schema.validateSync(value, { abortEarly: false }); expect.fail("Should throw error."); } catch (error) { if (error instanceof Yup.ValidationError) { expect(error.errors).to.deep.equal([ 'must-have-one-item' ]); } else { throw error; } }
Expected behavior
Should throw error 'must-have-one-item';
'must-have-one-item'
Platform:
Additional context Does not work in Yup v0.31.0. Worked fine in Yup v0.29.3.
The text was updated successfully, but these errors were encountered:
#1127
Sorry, something went wrong.
No branches or pull requests
Describe the bug
array.min
does not throw any error whenabortEarly: false
option is specified.To Reproduce
RunKit: https://runkit.com/lench/yup-array-validation
Expected behavior
Should throw error
'must-have-one-item'
;Platform:
Additional context
Does not work in Yup v0.31.0.
Worked fine in Yup v0.29.3.
The text was updated successfully, but these errors were encountered: