respect-validation/docs
Henrique Moody 1f6c821fb6
Refactor "Sorted" rule
The sorted rule accepts a callback on its constructor that may be used
to filter values from inside the input. However, with the "Call" rule
one can archive almost the same result. Besides that particular
characteristic, its constructor accepts a boolean value to determine
whether the sorting is ascending or descending.

This commit will remove the callback from the constructor and replace
the boolean by a string which can be "ASC" or "DESC."

Along with those changes, this change will make a few more improvements:

- Make the exception message specific about the sorting direction;

- Allow the rule to validate also strings;

- Update documentation.

Co-authored-by: Danilo Correa <danilosilva87@gmail.com>
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-03-10 18:31:03 +01:00
..
rules Refactor "Sorted" rule 2019-03-10 18:31:03 +01:00
concrete-api.md Fix coding standard of a code in "concrete-api.md" 2019-02-10 12:37:33 +01:00
feature-guide.md Updated documentation about custom rules 2018-12-02 11:23:04 +01:00
index.md Update PHP support 2018-12-02 11:09:24 +01:00
installation.md Merge branch '1.1' 2018-08-23 02:12:44 +02:00
license.md Merge branch '1.1' 2018-08-23 02:12:44 +02:00
list-of-rules.md Create "Iban" rule 2019-02-10 12:54:54 +01:00