CustomerInputValidatorInterface

Extends

Interface CustomerInputValidatorInterface

category

System

package

Customer

subpackage

Interfaces

Methods

Returns a collection of error messages.

getErrorMessageCollection() : \EditableKeyValueCollection

Response

\EditableKeyValueCollection

Collection of error messages.

Returns error messages.

getErrorMessages() : array

Response

array

Error messages.

Returns the error status.

getErrorStatus() : boolean

Response

boolean

Error status.

Checks if the entered city is valid.

validateCity(string $p_city) : boolean

Arguments

$p_city

string

Customer's city.

Response

boolean

Is valid?

Checks if the entered customer's company is valid.

validateCompany(string $p_company) : boolean

Arguments

$p_company

string

Customer's company.

Response

boolean

Is valid?

Checks if the entered country exists.

validateCountry(integer $p_countryId) : boolean

Arguments

$p_countryId

integer

Customer's country ID.

Response

boolean

Is valid?

Checks if the entered country zone is valid.

validateCountryZone( $p_countryZoneName,  $p_countryId) : boolean

Cases:

  • If country has zones: It checks if zone belongs to country.
  • If country does not contain zones: It checks the minimum length of zone name.

Arguments

$p_countryZoneName

Customer's country zone name.

$p_countryId

Customer's country ID.

Response

boolean

Is valid?

Checks if the entered customer's date of birth is valid.

validateDateOfBirth(string $p_dateOfBirth) : boolean

Valid format is: dd.mm.yyyy

Arguments

$p_dateOfBirth

string

Customer's date of birth.

Response

boolean

Is valid?

Checks if the entered email is valid.

validateEmail(string $p_email, mixed $p_emailAddressCheck = false) : boolean

Arguments

$p_email

string

Customer's E-Mail address.

$p_emailAddressCheck

mixed

C

Response

boolean

Is valid?

Checks if the entered email and email confirmation are 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.

Arguments

$p_email

string

Customer's E-Mail address.

$p_emailConfirmation

string

Confirmation E-Mail address.

Response

boolean

Is valid?

Checks if the entered email already exists.

validateEmailExists(string $p_email, \CustomerInterface $customer = null) : boolean

Arguments

$p_email

string

Customer's E-Mail address-

$customer

\CustomerInterface

Customer.

Response

boolean

Is valid?

Checks if the entered customer's first name is valid.

validateFirstname(string $p_firstname) : boolean

Arguments

$p_firstname

string

Customer's first name.

Response

boolean

Is valid?

Checks if the entered customer's gender is valid.

validateGender(string $p_gender) : boolean

Arguments

$p_gender

string

Customer's gender.

Response

boolean

Is valid?

Checks if the entered customer's last name is valid.

validateLastname(string $p_lastname) : boolean

Arguments

$p_lastname

string

Customer's last name.

Response

boolean

Is valid?

Checks if the entered password is valid.

validatePassword(string $p_password, string $p_passwordConfirmation) : boolean

Arguments

$p_password

string

Customer's password.

$p_passwordConfirmation

string

Customer's password confirmation.

Response

boolean

Is valid?

Checks if the entered postcode is valid.

validatePostcode(string $p_postcode) : boolean

Arguments

$p_postcode

string

Customer's post code.

Response

boolean

Is valid?

Checks if the user has accepted the privacy policy.

validatePrivacy(string $p_privacyAccepted) : boolean

Arguments

$p_privacyAccepted

string

Response

boolean

Is valid?

Checks if the entered street is valid.

validateStreet(string $p_street) : boolean

Arguments

$p_street

string

Customer's street.

Response

boolean

Is valid?

Checks if the entered suburb is valid.

validateSuburb( $p_suburb) : boolean

Arguments

$p_suburb

Customer's suburb.

Response

boolean

Is valid?

Checks if the entered telephone number is valid.

validateTelephoneNumber(string $p_telephoneNumber) : boolean

Arguments

$p_telephoneNumber

string

Customer's telephone number.

Response

boolean

Is valid?