The "Alnum" rule is supposed to validate alphanumeric values, but
instead, it also validates any whitespace character as valid.
The rule also accepts a list of characters on its constructor, so it the
users intentionally want some specific characters to also be allowed it
is better than they also defined these characters on the rule's
constructor.
While refactoring the rule I could notice that "AbstractCtypeRule" is
just an overhead that does not add much to it, so instead of extending
it "Alnum" now extends "AbstractFilterRule" directly (which is the
parent of "AbstractCtypeRule").
And since we want all rules to follow our contribution guidelines, this
commit also make sure the "Alnum" rule is in accordance with that.
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Many changes were made on `ValidationException::stringify`:
- Add support for instances of `Exception`;
- Add support for instances of `Traversable`;
- Add support for resources;
- Improve `Array` conversion;
- Improve `Object` conversion;
- Improve conversion of all values by using JSON.
Now, all the parameters of the exception classes are just converted to
string when replacing parameters on exceptions, so the exception classes
now keep the original value of all parameters.