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

number-Validator: null-Value validates differently for different number-ranges #643

Open
markusm7 opened this issue May 30, 2019 · 0 comments

Comments

@markusm7
Copy link

markusm7 commented May 30, 2019

Environment

  • Ember Version: 3.8.0
  • Ember CLI Version: 3.8.1
  • Ember CP Validations Version: 3.5.5

Steps to Reproduce

Implement number-validator with options:

{
  allowString: true,
  integer: true,
  // allowNone: false,
  gte: -1,
  lte: 10
}

null or undefined validate this to true (because of allowNone defaults to true)
Positive number ranges like from 1 to 10 wont behave like that. Why is this the case?
Either allowNone works for every number range or it does never if there is a range provided.

Or am i missing something?

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