Comparions
All rules in this page can be applies to number and date
Between
Validates if the input is between two numbers
v.val(25,"between 18 and 60"); // trueOr two dates
v.val(v.date("2020-10-01"), "between 2020-01-01 and 2021-01-01")Interval
Like between, validates the input is in the range.
The following rule has the same result as between 18 and 60
v.val(36,"[18..60]"); // trueBesides closed interval, Rebb Val also support open interval and half-open interval
v.val(60, "(18,60)"); // false
v.val(60, "(18,60]"); // true
v.val(18, "(18,60)"); // false
v.val(18, "[18,60)"); // trueYou can use date interval like this
Equals
Not Equal
Greater than
Greater than and equal
Less than
Less than and equal
Last updated
Was this helpful?