Valiant::Error - A single error encountered during validation.
This won't be used standalone. Its always a collection of Error objects inside the Valiant::Errors module.
A Single Error.
This is generally an internal class and you are unlikely to use it directly. For the most part its used by Valiant::Errors.
This class defines the following attributes
Either a translation tag or text string of the error
The attribute which is associated with the error or undef if the error is for the model
This class exposes the following methods for public users.
Returns true of the error matches (has the same parameters) as the arguments passed. This differs from "strict_match" in that $options don't need to be completely identical; it must ony be the case that the $options passed in the arguments intersects with that actual options of the error (that is the error has to have everything in $options BUT it can have more things.
$options
Same as "match" except <$options> must exactly match and not just intersect.
Returna a boolean based on if $error is functionally equal. By this it is meant that it has the same attribute values (not that it is the same error instance).
$error
This includes options matching.
options
Create a new copy of the error.
Valiant, Valiant::Errors.
See Valiant
To install Valiant, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Valiant
CPAN shell
perl -MCPAN -e shell install Valiant
For more information on module installation, please visit the detailed CPAN module installation guide.