Class CustomerInputValidator
Class CustomerInputValidator
Validator class that checks the entered user data.
- CustomerInputValidator implements CustomerInputValidatorInterface uses XtcUtilityTrait
Direct known subclasses
CustomerAccountInputValidator,
CustomerAddressInputValidator,
CustomerRegistrationInputValidatorService
Category: System
Implements: CustomerInputValidatorInterface
Located at Services/Core/Customer/CustomerInputValidator.inc.php
Methods summary
public
__construct( CustomerServiceInterface $customerService, CountryServiceInterface $countryService, CustomerInputValidatorSettingsInterface $customerInputValidatorSettings, CustomerCountryRepositoryInterface $customerCountryRepository, CustomerCountryZoneRepositoryInterface $customerCountryZoneRepository, VatNumberValidatorInterface $vatNumberValidator )
Constructor of the class CustomerInputValidator.
public
validateGender( string $p_gender )
: boolean
Checks if the entered customer's gender is valid.
public
validateFirstname( string $p_firstname )
: boolean
Checks if the entered customer's first name is valid.
public
validateLastname( string $p_lastname )
: boolean
Checks if the entered customer's last name is valid.
public
validateDateOfBirth( string $p_dateOfBirth )
: boolean
Checks if the entered customer's date of birth is valid. Valid format is: dd.mm.yyyy
public
validateCompany( string $p_company )
: boolean
Checks if the entered customer's company is valid.
public
validateVatNumber( string $p_vatNumber, integer $p_countryId, boolean $p_isGuest )
: boolean
Checks if the entered parameters are in a valid format.
public
validateEmailAndConfirmation( string $p_email, string $p_emailConfirmation )
: boolean
Checks if the entered email and email confirmation are valid. It will check the minimum length, address syntax, confirmation matching and existence of e-mail address.
public
validateEmail( string $p_email, mixed $p_emailAddressCheck = false )
: boolean
Checks if the entered email is valid.
public
validateEmailExists( string $p_email, CustomerInterface $customer = null )
: boolean
Checks if the entered email already exists.
public
validateHouseNumber( string $p_house_number )
: boolean
Checks if the entered house number is valid.
public
validateCountryZone( $p_countryZone, $p_countryId )
: boolean
Checks if the entered country zone is valid.
public
validateTelephoneNumber( string $p_telephoneNumber )
: boolean
Checks if the entered telephone number is valid.
public
validateFaxNumber( string $p_faxNumber )
: boolean
Checks if the entered fax number is valid.
public
validatePassword( string $p_password, string $p_passwordConfirmation )
: boolean
Checks if the entered password is valid.
public
validatePrivacy( string $p_privacyAccepted )
: boolean
Checks if the user has accepted the privacy policy.
public
validateCaptcha( array $p_customerInput, string $p_section = 'vvCode' )
: boolean
Checks if the captcha input is valid.
public
validateAddonValues( KeyValueCollection $addonValues )
: boolean
Checks if the entered additional values are valid.
public
getErrorMessageCollection( void )
: EditableKeyValueCollection
Returns a collection of error messages.
Methods used from XtcUtilityTrait
xtcDateRaw(),
xtcValidateEmail()
Properties summary
protected
$customerCountryRepository
: CustomerCountryRepositoryInterface
Customer country repository.
protected
$customerCountryZoneRepository
: CustomerCountryZoneRepositoryInterface
Customer country zone repository.