NAME
Kernel::System::CheckItem – check items
DESCRIPTION
All item check functions.
PUBLIC INTERFACE
new()
Don't use the constructor directly, use the ObjectManager instead:
my $CheckItemObject = $Kernel::OM->Get('Kernel::System::CheckItem');
CheckError()
get the error of check item back
my $Error = $CheckItemObject->CheckError();
CheckErrorType()
get the error's type of check item back
my $ErrorType = $CheckItemObject->CheckErrorType();
CheckEmail()
returns true if check was successful, if it's false, get the error message from CheckError()
my $Valid = $CheckItemObject->CheckEmail(
Address => 'info@example.com',
);
StringClean()
clean a given string
my $StringRef = $CheckItemObject->StringClean(
StringRef => \'String',
TrimLeft => 0, # (optional) default 1
TrimRight => 0, # (optional) default 1
RemoveAllNewlines => 1, # (optional) default 0
RemoveAllTabs => 1, # (optional) default 0
RemoveAllSpaces => 1, # (optional) default 0
);
CreditCardClean()
clean a given string and remove credit card
my ($StringRef, $Found) = $CheckItemObject->CreditCardClean(
StringRef => \'String',
);