Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • CustomerAccountInputValidator
  • CustomerInputValidator
  • CustomerMemoCollection
  • CustomerRegistrationInputValidatorService
  • VatNumberValidator

Class CustomerInputValidator

Class CustomerInputValidator

Validator class that checks the entered user data.

CustomerInputValidator implements CustomerInputValidatorInterface

Direct known subclasses

CustomerAccountInputValidator, CustomerAddressInputValidator, CustomerRegistrationInputValidatorService

Package: Customer\Validation
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.

Constructor of the class CustomerInputValidator.

Parameters

$customerService
Customer service.
$countryService
Country service.
$customerInputValidatorSettings
Customer input validator settings.
$customerCountryRepository
Customer country repository.
$customerCountryZoneRepository
Customer country zone repository.
$vatNumberValidator
VAT number validator.
public boolean
# validateGender( string $p_gender )

Checks if the entered customer's gender is valid.

Checks if the entered customer's gender is valid.

Parameters

$p_gender
Customer's gender.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateGender()
public boolean
# validateFirstname( string $p_firstname )

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

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

Parameters

$p_firstname
Customer's first name.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateFirstname()
public boolean
# validateLastname( string $p_lastname )

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

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

Parameters

$p_lastname
Customer's last name.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateLastname()
public boolean
# validateDateOfBirth( string $p_dateOfBirth )

Checks if the entered customer's date of birth is valid. Valid format is: dd.mm.yyyy

Checks if the entered customer's date of birth is valid. Valid format is: dd.mm.yyyy

Parameters

$p_dateOfBirth
Customer's date of birth.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateDateOfBirth()
public boolean
# validateCompany( string $p_company )

Checks if the entered customer's company is valid.

Checks if the entered customer's company is valid.

Parameters

$p_company
Customer's company.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateCompany()
public boolean
# validateVatNumber( string $p_vatNumber, integer $p_countryId, boolean $p_isGuest )

Checks if the entered parameters are in a valid format.

Checks if the entered parameters are in a valid format.

Parameters

$p_vatNumber
VAT number.
$p_countryId
Country ID.
$p_isGuest
Is customer a guest?

Returns

boolean
Is valid?
public boolean
# validateEmailAndConfirmation( string $p_email, string $p_emailConfirmation )

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.

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.

Parameters

$p_email
Customer's E-Mail address.
$p_emailConfirmation
Confirmation E-Mail address.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateEmailAndConfirmation()
public boolean
# validateEmail( string $p_email )

Checks if the entered email is valid.

Checks if the entered email is valid.

Parameters

$p_email
Customer's E-Mail address.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateEmail()
public boolean
# validateEmailExists( string $p_email, CustomerInterface $customer = null )

Checks if the entered email already exists.

Checks if the entered email already exists.

Parameters

$p_email
Customer's E-Mail address-
$customer
Customer.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateEmailExists()
public boolean
# validateStreet( string $p_street )

Checks if the entered street is valid.

Checks if the entered street is valid.

Parameters

$p_street
Customer's street.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateStreet()
public boolean
# validateHouseNumber( string $p_house_number )

Checks if the entered house number is valid.

Checks if the entered house number is valid.

Parameters

$p_house_number
Customer's house number.

Returns

boolean
Is valid?
public boolean
# validatePostcode( string $p_postcode )

Checks if the entered postcode is valid.

Checks if the entered postcode is valid.

Parameters

$p_postcode
Customer's post code.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validatePostcode()
public boolean
# validateCity( string $p_city )

Checks if the entered city is valid.

Checks if the entered city is valid.

Parameters

$p_city
Customer's city.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateCity()
public boolean
# validateCountry( integer $p_countryId )

Checks if the entered country exists.

Checks if the entered country exists.

Parameters

$p_countryId
Customer's country ID.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateCountry()
public boolean
# validateCountryZone( $p_countryZone, $p_countryId )

Checks if the entered country zone is valid.

Checks if the entered country zone is valid.

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_countryZone
country zone name.
$p_countryId
country ID.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateCountryZone()
public boolean
# validateSuburb( $p_suburb )

Checks if the entered suburb is valid.

Checks if the entered suburb is valid.

Parameters

$p_suburb
suburb.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateSuburb()
public boolean
# validateTelephoneNumber( string $p_telephoneNumber )

Checks if the entered telephone number is valid.

Checks if the entered telephone number is valid.

Parameters

$p_telephoneNumber
Customer's telephone number.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validateTelephoneNumber()
public boolean
# validateFaxNumber( string $p_faxNumber )

Checks if the entered fax number is valid.

Checks if the entered fax number is valid.

Parameters

$p_faxNumber
Customer's fax number.

Returns

boolean
Is valid?
public boolean
# validatePassword( string $p_password, string $p_passwordConfirmation )

Checks if the entered password is valid.

Checks if the entered password is valid.

Parameters

$p_password
Customer's password.
$p_passwordConfirmation
Customer's password confirmation.

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validatePassword()
public boolean
# validatePrivacy( string $p_privacyAccepted )

Checks if the user has accepted the privacy policy.

Checks if the user has accepted the privacy policy.

Parameters

$p_privacyAccepted

Returns

boolean
Is valid?

Implementation of

CustomerInputValidatorInterface::validatePrivacy()
public boolean
# validateAddonValues( KeyValueCollection $addonValues )

Checks if the entered additional values are valid.

Checks if the entered additional values are valid.

Overload this method to implement needed validation logic.

Parameters

$addonValues
Customer's additional values.

Returns

boolean
Is valid?
public array
# getErrorMessages( )

Returns error messages.

Returns error messages.

Deprecated

Use getErrorMessageCollection() instead

Returns

array
Error messages.

Implementation of

CustomerInputValidatorInterface::getErrorMessages()
public EditableKeyValueCollection
# getErrorMessageCollection( )

Returns a collection of error messages.

Returns a collection of error messages.

Returns

EditableKeyValueCollection
Collection of error messages.

Implementation of

CustomerInputValidatorInterface::getErrorMessageCollection()
public boolean
# getErrorStatus( )

Returns the error status.

Returns the error status.

Returns

boolean
Error status.

Implementation of

CustomerInputValidatorInterface::getErrorStatus()

Properties summary

protected CustomerCountryRepositoryInterface $customerCountryRepository

Customer country repository.

Customer country repository.

#
protected CustomerCountryZoneRepositoryInterface $customerCountryZoneRepository

Customer country zone repository.

Customer country zone repository.

#
protected CustomerServiceInterface $customerService

Customer service.

Customer service.

#
protected CountryServiceInterface $countryService

Country service.

Country service.

#
protected CustomerInputValidatorSettingsInterface $settings

Customer input validator settings.

Customer input validator settings.

#
protected VatNumberValidatorInterface $vatNumberValidator

VAT number validator.

VAT number validator.

#
protected EditableKeyValueCollection $errorMessageCollection

Error message collection.

Error message collection.

#
protected boolean $errorStatus

Error status.

Error status.

# false
API documentation generated by ApiGen