Validator trait
Framework\Validation\Traits\Validator
Trait Validator.
Defined in libraries/validation/src/Traits/Validator.php
Methods #
- alpha()
- Validates alphabetic characters.
- alphaNumber()
- Validates a number or alphabetic characters.
- array()
- Validates array.
- base64()
- Validates a base64 string.
- between()
- Validate field between min and max values.
- bool()
- Validates boolean.
- datetime()
- Validates a datetime format.
- email()
- Validates a email.
- equals()
- Validate field has value equals other field.
- float()
- Validates float.
- greater()
- Validates is greater than.
- greaterOrEqual()
- Validates is greater than or equal to.
- hex()
- Validates a hexadecimal string.
- hexColor()
- Validates a hexadecimal color.
- in()
- Validate field is in list.
- int()
- Validates integer.
- ip()
- Validates an IP.
- isset()
- Validates field is set.
- json()
- Validates a JSON string.
- latin()
- Validates a latin text.
- length()
- Validates exact length.
- less()
- Validates is less than.
- lessOrEqual()
- Validates is less than or equal to.
- maxLength()
- Validates max length.
- md5()
- Validates a md5 hash.
- minLength()
- Validates min length.
- notBetween()
- Validate field not between min and max values.
- notEquals()
- Validate field has not value equals other field.
- notIn()
- Validate field is not in list.
- notRegex()
- Validates a Regex no matching pattern.
- number()
- Validates a number.
- object()
- Validates object.
- regex()
- Validates a Regex pattern.
- required()
- Validates required value.
- slug()
- Validates slug.
- specialChar()
- Validates special characters.
- string()
- Validates string.
- timezone()
- Validates a timezone.
- url()
- Validates an URL.
- uuid()
- Validates a UUID.
alpha()
Validates alphabetic characters.
alphaNumber()
Validates a number or alphabetic characters.
array()
Validates array.
base64()
Validates a base64 string.
between()
Validate field between min and max values.
- string|int $min
- string|int $max
bool()
Validates boolean.
datetime()
Validates a datetime format.
- string $format
email()
Validates a email.
equals()
Validate field has value equals other field.
- string $equalsField
float()
Validates float.
greater()
Validates is greater than.
- string|int $greaterThan
greaterOrEqual()
Validates is greater than or equal to.
- string|int $greaterThanOrEqualTo
hex()
Validates a hexadecimal string.
hexColor()
Validates a hexadecimal color.
in()
Validate field is in list.
- string $in
- string $others
int()
Validates integer.
ip()
Validates an IP.
- int $version - 4, 6 or 0 to both
isset()
Validates field is set.
json()
Validates a JSON string.
latin()
Validates a latin text.
length()
Validates exact length.
- int $length
less()
Validates is less than.
- string|int $lessThan
lessOrEqual()
Validates is less than or equal to.
- string|int $lessThanOrEqualTo
maxLength()
Validates max length.
- int $maxLength
md5()
Validates a md5 hash.
minLength()
Validates min length.
- int $minLength
notBetween()
Validate field not between min and max values.
- string|int $min
- string|int $max
notEquals()
Validate field has not value equals other field.
- string $diffField
notIn()
Validate field is not in list.
- string $notIn
- string $others
notRegex()
Validates a Regex no matching pattern.
- string $pattern
number()
Validates a number.
object()
Validates object.
regex()
Validates a Regex pattern.
- string $pattern
required()
Validates required value.
slug()
Validates slug.
specialChar()
Validates special characters.
- int $quantity
- string $characters
string()
Validates string.
timezone()
Validates a timezone.
url()
Validates an URL.
uuid()
Validates a UUID.