Welcome Guest, Not a member yet? Register   Sign In
Validation rules are back to front
#3

From the docs:

less_than: Fails if field is greater than or equal to the parameter value or not numeric.
less_than_equal_to: Fails if field is greater than the parameter value or not numeric.

So, from your test, with a POST value of 1:
less_than[1]: This rule expects a value that is less than 1. The POST value IS NOT less than 1, so it will fail.
less_than_equal_to[1]: This rule expects a value less than OR equal to 1. The POST value IS EQUAL TO 1, so it will pass the validation.
Reply


Messages In This Thread
Validation rules are back to front - by antidote - 08-18-2023, 01:35 AM
RE: Validation rules are back to front - by sammyskills - 08-18-2023, 04:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB