NAME
Kernel::System::DataValidation::Errors – Represents a collection of unsuccessful validators
as error objects.
PUBLIC INTERFACE
This class acts as a container of error objects, that are created by failing validators
. For more information about error objects, please refer to Kernel::System::DataValidation::Error.
It will be used by the data validation backend automatically. For more information, please refer to Kernel::System::DataValidation.
has Errors
Contains the error objects as a hash reference, indicated by their related field names.
AddError()
Appends a new error object to the Errors
attribute, please see "has Errors".
$Errors->AddError(
Field => 'FieldName',
Error => $ErrorObject,
);
ToHash()
Converts and returns the information of the collected error objects as a hash reference.
my $HashReference = $Errors->ToHash();
ToJSON()
Converts and returns the information of the collected error objects as a JSON string.
my $JSONString = $Errors->ToJSON();