Class CustomerInputValidator
Validator class that checks the entered user data.
| category |
System |
|---|---|
| package |
Customer |
| subpackage |
Validation |
| implements |
CustomerInputValidatorInterface |
__construct(\CustomerServiceInterface $customerService, \CountryServiceInterface $countryService, \CustomerInputValidatorSettingsInterface $customerInputValidatorSettings, \CustomerCountryRepositoryInterface $customerCountryRepository, \CustomerCountryZoneRepositoryInterface $customerCountryZoneRepository, \VatNumberValidatorInterface $vatNumberValidator)
\CustomerInputValidatorSettingsInterfaceCustomer input validator settings.
\CustomerCountryZoneRepositoryInterfaceCustomer country zone repository.
getErrorMessageCollection() : \EditableKeyValueCollection
getErrorMessages() : array
| deprecated |
Use getErrorMessageCollection() instead |
|---|---|
arrayError messages.
getErrorStatus() : boolean
booleanError status.
validateAddonValues(\KeyValueCollection $addonValues) : boolean
Overload this method to implement needed validation logic.
booleanIs valid?
validateCaptcha(array $p_customerInput, string $p_section = 'vvCode') : boolean
arrayInput Customer form input.
stringCaptcha section.
booleanis captcha valid?
validateCity(string $p_city) : boolean
stringCustomer's city.
booleanIs valid?
validateCompany(string $p_company) : boolean
stringCustomer's company.
booleanIs valid?
validateCountry(integer $p_countryId) : boolean
integerCustomer's country ID.
booleanIs valid?
validateCountryZone( $p_countryZone, $p_countryId) : boolean
Cases:
Customer's country zone name.
Customer's country ID.
booleanIs valid?
validateDateOfBirth(string $p_dateOfBirth) : boolean
Valid format is: dd.mm.yyyy
stringCustomer's date of birth.
booleanIs valid?
validateEmail(string $p_email, mixed $p_emailAddressCheck = false) : boolean
stringCustomer's E-Mail address.
mixedC
booleanIs valid?
validateEmailAndConfirmation(string $p_email, string $p_emailConfirmation) : boolean
It will check the minimum length, address syntax, confirmation matching and existence of e-mail address.
stringCustomer's E-Mail address.
stringConfirmation E-Mail address.
booleanIs valid?
validateEmailExists(string $p_email, \CustomerInterface $customer = null) : boolean
stringCustomer's E-Mail address-
booleanIs valid?
validateFaxNumber(string $p_faxNumber) : boolean
stringCustomer's fax number.
booleanIs valid?
validateFirstname(string $p_firstname) : boolean
stringCustomer's first name.
booleanIs valid?
validateGender(string $p_gender) : boolean
stringCustomer's gender.
booleanIs valid?
validateHouseNumber(string $p_house_number) : boolean
stringCustomer's house number.
booleanIs valid?
validateLastname(string $p_lastname) : boolean
stringCustomer's last name.
booleanIs valid?
validatePassword(string $p_password, string $p_passwordConfirmation) : boolean
stringCustomer's password.
stringCustomer's password confirmation.
booleanIs valid?
validatePostcode(string $p_postcode) : boolean
stringCustomer's post code.
booleanIs valid?
validatePrivacy(string $p_privacyAccepted) : boolean
string
booleanIs valid?
validateStreet(string $p_street) : boolean
stringCustomer's street.
booleanIs valid?
validateSuburb( $p_suburb) : boolean
Customer's suburb.
booleanIs valid?
validateTelephoneNumber(string $p_telephoneNumber) : boolean
stringCustomer's telephone number.
booleanIs valid?
validateVatNumber(string $p_vatNumber, integer $p_countryId, boolean $p_isGuest) : boolean
stringVAT number.
integerCountry ID.
booleanIs customer a guest?
booleanIs valid?
xtcDateRaw(string $date, boolean $reverse = false) : string
The function file can be found here: src/inc/xtc_date_raw.inc.php
Return date in raw format.
Provided $p_date parameter should be in DD.MM.YYYY or MM.DD.YYYY format depending the current language. The result (raw date) will be formatted in YYYYMMDD. If the provided $p_date parameter is invalid the result will be an empty string.
string
boolean(optional)
string
xtcValidateEmail( $email, $emailAddressCheck)
customerCountryRepository : \CustomerCountryRepositoryInterface
customerCountryZoneRepository : \CustomerCountryZoneRepositoryInterface
settings : \CustomerInputValidatorSettingsInterface
vatNumberValidator : \VatNumberValidatorInterface
errorMessageCollection : \EditableKeyValueCollection
errorStatus : boolean
| var |
|---|
boolean