phpDocumentor

CustomerInputValidatorInterface

Interface CustomerInputValidatorInterface

Tags
category

System

subpackage

Interfaces

Table of Contents

getErrorMessageCollection()  : EditableKeyValueCollection
Returns a collection of error messages.
getErrorMessages()  : array<string|int, mixed>
Returns error messages.
getErrorStatus()  : bool
Returns the error status.
validateCity()  : bool
Checks if the entered city is valid.
validateCompany()  : bool
Checks if the entered customer's company is valid.
validateCountry()  : bool
Checks if the entered country exists.
validateCountryZone()  : bool
Checks if the entered country zone is valid.
validateDateOfBirth()  : bool
Checks if the entered customer's date of birth is valid.
validateEmail()  : bool
Checks if the entered email is valid.
validateEmailAndConfirmation()  : bool
Checks if the entered email and email confirmation are valid.
validateEmailExists()  : bool
Checks if the entered email already exists.
validateFirstname()  : bool
Checks if the entered customer's first name is valid.
validateGender()  : bool
Checks if the entered customer's gender is valid.
validateLastname()  : bool
Checks if the entered customer's last name is valid.
validatePassword()  : bool
Checks if the entered password is valid.
validatePostcode()  : bool
Checks if the entered postcode is valid.
validatePrivacy()  : bool
Checks if the user has accepted the privacy policy.
validateStreet()  : bool
Checks if the entered street is valid.
validateSuburb()  : bool
Checks if the entered suburb is valid.
validateTelephoneNumber()  : bool
Checks if the entered telephone number is valid.

Methods

getErrorMessages()

Returns error messages.

public getErrorMessages() : array<string|int, mixed>
Return values
array<string|int, mixed>

Error messages.

validateCity()

Checks if the entered city is valid.

public validateCity(string $p_city) : bool
Parameters
$p_city : string

Customer's city.

Return values
bool

Is valid?

validateCompany()

Checks if the entered customer's company is valid.

public validateCompany(string $p_company) : bool
Parameters
$p_company : string

Customer's company.

Return values
bool

Is valid?

validateCountry()

Checks if the entered country exists.

public validateCountry(int $p_countryId) : bool
Parameters
$p_countryId : int

Customer's country ID.

Return values
bool

Is valid?

validateCountryZone()

Checks if the entered country zone is valid.

public validateCountryZone( $p_countryZoneName,  $p_countryId) : bool

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.
Parameters
$p_countryZoneName :

Customer's country zone name.

$p_countryId :

Customer's country ID.

Return values
bool

Is valid?

validateDateOfBirth()

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

public validateDateOfBirth(string $p_dateOfBirth) : bool

Valid format is: dd.mm.yyyy

Parameters
$p_dateOfBirth : string

Customer's date of birth.

Return values
bool

Is valid?

validateEmail()

Checks if the entered email is valid.

public validateEmail(string $p_email[, mixed $p_emailAddressCheck = false ]) : bool
Parameters
$p_email : string

Customer's E-Mail address.

$p_emailAddressCheck : mixed = false

C

Return values
bool

Is valid?

validateEmailAndConfirmation()

Checks if the entered email and email confirmation are valid.

public validateEmailAndConfirmation(string $p_email, string $p_emailConfirmation) : bool

It will check the minimum length, address syntax, confirmation matching and existence of e-mail address.

Parameters
$p_email : string

Customer's E-Mail address.

$p_emailConfirmation : string

Confirmation E-Mail address.

Return values
bool

Is valid?

validateFirstname()

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

public validateFirstname(string $p_firstname) : bool
Parameters
$p_firstname : string

Customer's first name.

Return values
bool

Is valid?

validateGender()

Checks if the entered customer's gender is valid.

public validateGender(string $p_gender) : bool
Parameters
$p_gender : string

Customer's gender.

Return values
bool

Is valid?

validateLastname()

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

public validateLastname(string $p_lastname) : bool
Parameters
$p_lastname : string

Customer's last name.

Return values
bool

Is valid?

validatePassword()

Checks if the entered password is valid.

public validatePassword(string $p_password, string $p_passwordConfirmation) : bool
Parameters
$p_password : string

Customer's password.

$p_passwordConfirmation : string

Customer's password confirmation.

Return values
bool

Is valid?

validatePostcode()

Checks if the entered postcode is valid.

public validatePostcode(string $p_postcode) : bool
Parameters
$p_postcode : string

Customer's post code.

Return values
bool

Is valid?

validatePrivacy()

Checks if the user has accepted the privacy policy.

public validatePrivacy(string $p_privacyAccepted) : bool
Parameters
$p_privacyAccepted : string
Return values
bool

Is valid?

validateStreet()

Checks if the entered street is valid.

public validateStreet(string $p_street) : bool
Parameters
$p_street : string

Customer's street.

Return values
bool

Is valid?

validateSuburb()

Checks if the entered suburb is valid.

public validateSuburb( $p_suburb) : bool
Parameters
$p_suburb :

Customer's suburb.

Return values
bool

Is valid?

validateTelephoneNumber()

Checks if the entered telephone number is valid.

public validateTelephoneNumber(string $p_telephoneNumber) : bool
Parameters
$p_telephoneNumber : string

Customer's telephone number.

Return values
bool

Is valid?

Search results