
#########
CheckItem
#########


****
NAME
****


Kernel::System::CheckItem - check items


***********
DESCRIPTION
***********


All item check functions.


****************
PUBLIC INTERFACE
****************


new()
=====


Don't use the constructor directly, use the ObjectManager instead:


.. code-block:: perl

     my $CheckItemObject = $Kernel::OM->Get('Kernel::System::CheckItem');



CheckError()
============


get the error of check item back


.. code-block:: perl

     my $Error = $CheckItemObject->CheckError();



CheckErrorType()
================


get the error's type of check item back


.. code-block:: perl

     my $ErrorType = $CheckItemObject->CheckErrorType();



CheckEmail()
============


returns true if check was successful, if it's false, get the error message
from CheckError()


.. code-block:: perl

     my $Valid = $CheckItemObject->CheckEmail(
         Address => 'info@example.com',
     );



AreEmailAddressesValid()
========================



.. code-block:: perl

     Checks if the given string contains only valid email address(es).
 
     my $EmailAddressesAreValid = $UtilObject->AreEmailAddressesValid(
         EmailAddresses => 'test@example.org, test2@example.org',
 
         # or as array ref
         EmailAddresses => [
             'test@example.org',
             'test2@example.org',
         ],
 
         # also works with just one address
         EmailAddresses => 'test@example.org',
 
         # or as array ref
         EmailAddresses => ['test@example.org'],
     );
 
     Returns true value if the given string only contains valid email addresses.



StringClean()
=============


clean a given string.


.. code-block:: perl

     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
         ReplaceWithWhiteSpace => 1,  # (optional) default 0
     );



CreditCardClean()
=================


clean a given string and remove credit card


.. code-block:: perl

     my ($StringRef, $Found) = $CheckItemObject->CreditCardClean(
         StringRef => \'String',
     );





