Class CustomerRegistrationInputValidatorService
This class is used for validating customer input while registration
category |
System |
---|---|
package |
Customer |
subpackage |
Validation |
extends |
CustomerInputValidator |
implements |
CustomerRegistrationInputValidatorServiceInterface |
__construct(\CustomerServiceInterface $customerService, \CountryServiceInterface $countryService, \CustomerInputValidatorSettingsInterface $customerInputValidatorSettings, \CustomerCountryRepositoryInterface $customerCountryRepository, \CustomerCountryZoneRepositoryInterface $customerCountryZoneRepository, \VatNumberValidatorInterface $vatNumberValidator)
\CustomerInputValidatorSettingsInterface
Customer input validator settings.
\CustomerCountryZoneRepositoryInterface
Customer country zone repository.
_namesOptionalAndCompanyNotEmpty(array $inputArray)
array
_validateDataByArray(array $inputArray) : boolean
Expects an array with the following keys:
array
Customer Input array.
boolean
Is customer data valid?
getErrorMessageCollection() : \EditableKeyValueCollection
getErrorMessages() : array
deprecated |
Use getErrorMessageCollection() instead |
---|---|
array
Error messages.
getErrorStatus() : boolean
boolean
Error status.
validateAddonValues(\KeyValueCollection $addonValues) : boolean
Overload this method to implement needed validation logic.
boolean
Is valid?
validateCaptcha(array $p_customerInput, string $p_section = 'vvCode') : boolean
array
Input Customer form input.
string
Captcha section.
boolean
is captcha valid?
validateCity(string $p_city) : boolean
string
Customer's city.
boolean
Is valid?
validateCompany(string $p_company) : boolean
string
Customer's company.
boolean
Is valid?
validateCountry(integer $p_countryId) : boolean
integer
Customer's country ID.
boolean
Is valid?
validateCountryZone( $p_countryZone, $p_countryId) : boolean
Cases:
Customer's country zone name.
Customer's country ID.
boolean
Is valid?
validateCustomerDataByArray(array $inputArray) : boolean
Expects array with following keys:
array
Customer data input.
boolean
Is customer data valid?
validateDateOfBirth(string $p_dateOfBirth) : boolean
Valid format is: dd.mm.yyyy
string
Customer's date of birth.
boolean
Is valid?
validateEmail(string $p_email, mixed $p_emailAddressCheck = false) : boolean
string
Customer's E-Mail address.
mixed
C
boolean
Is 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.
string
Customer's E-Mail address.
string
Confirmation E-Mail address.
boolean
Is valid?
validateEmailExists(string $p_email, \CustomerInterface $customer = null) : boolean
string
Customer's E-Mail address-
boolean
Is valid?
validateFaxNumber(string $p_faxNumber) : boolean
string
Customer's fax number.
boolean
Is valid?
validateFirstname(string $p_firstname) : boolean
string
Customer's first name.
boolean
Is valid?
validateGender(string $p_gender) : boolean
string
Customer's gender.
boolean
Is valid?
validateGuestDataByArray(array $inputArray) : boolean
expects array with following keys:
array
Guest customer data input.
boolean
Is guest customer data valid?
validateHouseNumber(string $p_house_number) : boolean
string
Customer's house number.
boolean
Is valid?
validateLastname(string $p_lastname) : boolean
string
Customer's last name.
boolean
Is valid?
validatePassword(string $p_password, string $p_passwordConfirmation) : boolean
string
Customer's password.
string
Customer's password confirmation.
boolean
Is valid?
validatePostcode(string $p_postcode) : boolean
string
Customer's post code.
boolean
Is valid?
validatePrivacy(string $p_privacyAccepted) : boolean
string
boolean
Is valid?
validateStreet(string $p_street) : boolean
string
Customer's street.
boolean
Is valid?
validateSuburb( $p_suburb) : boolean
Customer's suburb.
boolean
Is valid?
validateTelephoneNumber(string $p_telephoneNumber) : boolean
string
Customer's telephone number.
boolean
Is valid?
validateVatNumber(string $p_vatNumber, integer $p_countryId, boolean $p_isGuest) : boolean
string
VAT number.
integer
Country ID.
boolean
Is customer a guest?
boolean
Is 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
customerService : \CustomerServiceInterface
countryService : \CountryServiceInterface
settings : \CustomerInputValidatorSettingsInterface
vatNumberValidator : \VatNumberValidatorInterface
errorMessageCollection : \EditableKeyValueCollection
errorStatus : boolean
var |
---|
boolean