Greater than and less than validation in Laravel 4
This blog post was originally published a little while ago. Please consider that it may no longer be relevant or even accurate.
Just wrote some new validators for testing whether one attribute is greater than or less than another attribute in a Laravel 4 form. Here's the implementation, as well as how you can adjust the error messages.
Now, you can set up your validations!
Of course, if this validation fails, you're going to get an ugly error message (validation.greater_than
to be specific). To override this, take a look in app/lang/en/validation.php
and find the custom
key.