NAME
Dancer2::Plugin::DataTransposeValidator::Validator
VERSION
Version 0.201
CONSTRUCTOR ARGS
The following constructor args are all required.
params
A hash reference of parameters to be validated.
rules
A hash reference with the following keys to be used by Data::Transpose::Validator:
options
The Data::Transpose::Validator constructor arguments.
prepare
The arguments for "prepare" in Data::Transpose::Validator.
css_error_class
The css error class. See "css_error_class" in Dancer2::Plugin::DataTransposeValidator.
errors_hash
Configuration which determines how "errors" are returned. See "errors_hash" in Dancer2::Plugin::DataTransposeValidator.
ATTRIBUTES
valid
Returns a boolean value indicating whether "params" are valid.
values
Returns a hash reference of transposed values.
css
If there are any "errors", returns a hash reference of field to css class for any fields with errors.
errors
If there are any errors, returns a hash reference of field and errors.
TO_JSON
Returns a hash reference of "valid" and "values", and if "valid" is false also adds "css" and "errors".
If JSON serializer has convert_blesssed
set to a true value, then this method is called automatically on object before serialization.