PromptLengthValidator extends LengthValidator
FinalYes
Table of Contents
Methods
- __construct() : mixed
- getMax() : int|null
- Returns maximum allowed length.
- getMin() : int|null
- Returns minimum allowed length.
- validate() : bool|string
- Checks minimum and/or maximum length (as string) of the value.
Methods
__construct()
public
__construct() : mixed
getMax()
Returns maximum allowed length.
public
getMax() : int|null
null if not set.
Return values
int|nullgetMin()
Returns minimum allowed length.
public
getMin() : int|null
null if not set.
Return values
int|nullvalidate()
Checks minimum and/or maximum length (as string) of the value.
public
validate(mixed $value, mixed $primary, array<string|int, mixed> $row, Field $field) : bool|string
Returns true if check was successful or string with error text otherwise.
Parameters
- $value : mixed
-
Value to check.
- $primary : mixed
-
Has no use in this function.
- $row : array<string|int, mixed>
-
Has no use in this function.
- $field : Field
-
Field metadata.