ContactParametersValidator
extends ParametersValidator
in package
Uses
IdentifiableItemsParametersValidatorTrait, EmailParametersValidatorTrait
This is the contact parameters validation class.
Table of Contents
| validate() | Throws an exception if some of the given parameters is wrong | : void |
|---|---|---|
| invokeValidation() | Invokes the needed validation with the given parameters | : bool|null |
| methodExists() | Determines if the required method exists on the current class | : bool |
| validateAddress() | : bool|null | |
| validateAddressAdditionalInformation() | : bool|null | |
| validateArray() | : bool|null | |
| validateArrayContains() | : bool|null | |
| validateAssociativeArray() | : bool|null | |
| validateBoolean() | : bool|null | |
| validateCity() | : bool|null | |
| validateComment() | : bool|null | |
| validateCompany() | : bool|null | |
| validateDate() | : bool|null | |
| validateEmail() | : bool|null | |
| validateEnumerateValue() | : bool|null | |
| validateEnumerateValues() | : bool|null | |
| validateFax() | : bool|null | |
| validateFirstName() | : bool|null | |
| validateId() | : bool|null | |
| validateIdList() | : bool|null | |
| validateItemsClass() | : bool|null | |
| validateLastName() | : bool|null | |
| validateMobile() | : bool|null | |
| validateMotiveId() | : bool|null | |
| validateNif() | : bool|null | |
| validateNumber() | : bool|null | |
| validateNumeric() | : bool|null | |
| validateNumericList() | : bool|null | |
| validatePhone() | : bool|null | |
| validatePId() | : bool|null | |
| validatePositiveNumeric() | : bool|null | |
| validatePostalCode() | : bool|null | |
| validateScalar() | : bool|null | |
| validateState() | : bool|null | |
| validateString() | : bool|null | |
| validateVat() | : bool|null |
Methods
validate()
Throws an exception if some of the given parameters is wrong
public
validate(array<string|int, mixed> $params) : void
Parameters
- $params : array<string|int, mixed>
Tags
Return values
void —invokeValidation()
Invokes the needed validation with the given parameters
protected
invokeValidation(string $method, mixed $paramValue) : bool|null
Parameters
- $method : string
- $paramValue : mixed
Return values
bool|null —methodExists()
Determines if the required method exists on the current class
protected
methodExists(string $method) : bool
Parameters
- $method : string
Return values
bool —validateAddress()
protected
validateAddress(mixed $address) : bool|null
Parameters
- $address : mixed
Return values
bool|null —validateAddressAdditionalInformation()
protected
validateAddressAdditionalInformation(mixed $addressAdditionalInformation) : bool|null
Parameters
- $addressAdditionalInformation : mixed
Return values
bool|null —validateArray()
protected
validateArray(mixed $array) : bool|null
Parameters
- $array : mixed
Return values
bool|null —validateArrayContains()
protected
validateArrayContains(mixed $value, array<string|int, mixed> $values) : bool|null
Parameters
- $value : mixed
- $values : array<string|int, mixed>
Return values
bool|null —validateAssociativeArray()
protected
validateAssociativeArray(mixed $array) : bool|null
Parameters
- $array : mixed
Return values
bool|null —validateBoolean()
protected
validateBoolean(mixed $bool) : bool|null
Parameters
- $bool : mixed
Return values
bool|null —validateCity()
protected
validateCity(mixed $city) : bool|null
Parameters
- $city : mixed
Return values
bool|null —validateComment()
protected
validateComment(mixed $comment) : bool|null
Parameters
- $comment : mixed
Return values
bool|null —validateCompany()
protected
validateCompany(mixed $company) : bool|null
Parameters
- $company : mixed
Return values
bool|null —validateDate()
protected
validateDate(mixed $date) : bool|null
Parameters
- $date : mixed
Return values
bool|null —validateEmail()
protected
validateEmail(mixed $email) : bool|null
Parameters
- $email : mixed
Return values
bool|null —validateEnumerateValue()
protected
validateEnumerateValue(mixed $value, string $enum) : bool|null
Parameters
- $value : mixed
- $enum : string
Return values
bool|null —validateEnumerateValues()
protected
validateEnumerateValues(mixed $values, string $enum) : bool|null
Parameters
- $values : mixed
- $enum : string
Return values
bool|null —validateFax()
protected
validateFax(mixed $fax) : bool|null
Parameters
- $fax : mixed
Return values
bool|null —validateFirstName()
protected
validateFirstName(mixed $firstName) : bool|null
Parameters
- $firstName : mixed
Return values
bool|null —validateId()
protected
validateId(mixed $id) : bool|null
Parameters
- $id : mixed
Return values
bool|null —validateIdList()
protected
validateIdList(mixed $idList) : bool|null
Parameters
- $idList : mixed
Return values
bool|null —validateItemsClass()
protected
validateItemsClass(mixed $items, string $class) : bool|null
Parameters
- $items : mixed
- $class : string
Return values
bool|null —validateLastName()
protected
validateLastName(mixed $lastName) : bool|null
Parameters
- $lastName : mixed
Return values
bool|null —validateMobile()
protected
validateMobile(mixed $mobile) : bool|null
Parameters
- $mobile : mixed
Return values
bool|null —validateMotiveId()
protected
validateMotiveId(mixed $motiveId) : bool|null
Parameters
- $motiveId : mixed
Return values
bool|null —validateNif()
protected
validateNif(mixed $nif) : bool|null
Parameters
- $nif : mixed
Return values
bool|null —validateNumber()
protected
validateNumber(mixed $number) : bool|null
Parameters
- $number : mixed
Return values
bool|null —validateNumeric()
protected
validateNumeric(mixed $numeric) : bool|null
Parameters
- $numeric : mixed
Return values
bool|null —validateNumericList()
protected
validateNumericList(mixed $numericList) : bool|null
Parameters
- $numericList : mixed
Return values
bool|null —validatePhone()
protected
validatePhone(mixed $phone) : bool|null
Parameters
- $phone : mixed
Return values
bool|null —validatePId()
protected
validatePId(mixed $pId) : bool|null
Parameters
- $pId : mixed
Return values
bool|null —validatePositiveNumeric()
protected
validatePositiveNumeric(mixed $numeric) : bool|null
Parameters
- $numeric : mixed
Return values
bool|null —validatePostalCode()
protected
validatePostalCode(mixed $postalCode) : bool|null
Parameters
- $postalCode : mixed
Return values
bool|null —validateScalar()
protected
validateScalar(mixed $scalar) : bool|null
Parameters
- $scalar : mixed
Return values
bool|null —validateState()
protected
validateState(mixed $state) : bool|null
Parameters
- $state : mixed
Return values
bool|null —validateString()
protected
validateString(mixed $string[, int $minLength = 1 ][, int $maxLength = PHP_INT_MAX ]) : bool|null
Parameters
- $string : mixed
- $minLength : int = 1
- $maxLength : int = PHP_INT_MAX
Return values
bool|null —validateVat()
protected
validateVat(mixed $vat) : bool|null
Parameters
- $vat : mixed