NAME
MVC::Neaf::X::Form::Data - Form validation result object.
CAUTION
This module should be moved into a separate distribution or (ideally) merged with an existing module with similar functionality.
Possible candidates include Validator::LIVR, Data::FormValidator, Data::CGIForm, and more.
DESCRIPTION
See MVC::Neaf::X::Form. This class is not expected to be created and used directly.
METHODS
is_valid()
Returns true if data passed validation, false otherwise.
data
Returns data that passed validation as hashref. This MAY be incomplete, check is_valid() first.
data( "key" )
Get specific data item.
data( key => $newvalue )
Set specific data item.
error
Returns errors that occurred during validation.
error( "key" )
Get specific error item.
error( key => $newvalue )
Set specific error item. This may be used to invalidate a value after additional checks, and will also reset is_valid.
raw
Returns raw input values as hashref. Only keys subject to validation will be retained.
This may be useful for sending the data back for resubmission.
raw( "key" )
Get specific raw item.
raw( key => $newvalue )
Set specific raw item.