Skip to content
New issue

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

Min/max validators bug out with undefined #3539

Closed
vkarpov15 opened this issue Nov 4, 2015 · 0 comments
Closed

Min/max validators bug out with undefined #3539

vkarpov15 opened this issue Nov 4, 2015 · 0 comments
Milestone

Comments

@vkarpov15
Copy link
Collaborator

If you specify a conditional required along with min and max, validation will fail if the field isn't defined.

var schema = new Schema({
  num: { type: Number, required: function() { return false; }, min: 0 }
});
@vkarpov15 vkarpov15 added this to the 4.2.5 milestone Nov 4, 2015
vkarpov15 added a commit that referenced this issue Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant