Bitrix API

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

getMax()

Returns maximum allowed length.

public getMax() : int|null

null if not set.

Return values
int|null

getMin()

Returns minimum allowed length.

public getMin() : int|null

null if not set.

Return values
int|null

validate()

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.

Return values
bool|string

        
On this page

Search results