AttributeValidator
in package
implements
AttributeValidatorInterface
Table of Contents
Interfaces
Constants
- NUMERICS = ['double', 'integer']
- PRIMITIVES = ['string', 'integer', 'double', 'boolean']
Methods
- getInvalidMessage() : string
- validate() : bool
- Validate whether a value is a primitive, or a homogeneous array of primitives (treating int/double as equivalent).
- validateArray() : bool
Constants
NUMERICS
private
mixed
NUMERICS
= ['double', 'integer']
PRIMITIVES
private
mixed
PRIMITIVES
= ['string', 'integer', 'double', 'boolean']
Methods
getInvalidMessage()
public
getInvalidMessage() : string
Return values
stringvalidate()
Validate whether a value is a primitive, or a homogeneous array of primitives (treating int/double as equivalent).
public
validate(mixed $value) : bool
Parameters
- $value : mixed
Tags
Return values
boolvalidateArray()
private
validateArray(array<string|int, mixed> $value) : bool
Parameters
- $value : array<string|int, mixed>