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

Between/Not-Between Validation #593

Closed
naveendb92 opened this issue Nov 10, 2017 · 5 comments
Closed

Between/Not-Between Validation #593

naveendb92 opened this issue Nov 10, 2017 · 5 comments
Labels
feature New feature
Milestone

Comments

@naveendb92
Copy link

Is the possible to add some validations like:

  1. Check if first value is greater than second value.
  2. Check if second value is less than first value.
@mistic100
Copy link
Owner

You are exactly describing the existing "between" and "not between" operators

@naveendb92
Copy link
Author

naveendb92 commented Nov 11, 2017

True. For the "between" and "not between" operators I want to add some basic validation. Is it possible ?

@mistic100
Copy link
Owner

I realized the values are not checked for these operators, I will add it., And you can do it yourself with validation.callback (see the doc)

@mistic100 mistic100 added this to the 2.4.5 milestone Nov 11, 2017
@mistic100 mistic100 added the feature New feature label Nov 11, 2017
@naveendb92
Copy link
Author

Sure, let me try.
Thank you

@naveendb92
Copy link
Author

Seems like there is a bug for Between/Not-Between validation feature.

I have tested in the official site under Demos section http://querybuilder.js.org/demo.html

Below is the link for snapshot where it validates correctly, telling that 12 is greater than 1
https://user-images.githubusercontent.com/29221698/33923855-6a44332e-dff9-11e7-8a47-4f11d60f5fdb.png

And, now if I increment the second value by 1. i.e., between 12 and 2. It doesn't validate. Below is the link for the snapshot.
https://user-images.githubusercontent.com/29221698/33923992-02ba1556-dffa-11e7-8cd4-053df77c693f.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants