Skip to content
docsv0.17.0

FieldConstraints

The declarative constraints on a field. `enumOptions` (presence) means a renderer should offer a select/radio; the values are type-consistent with the field's base FieldType.

FieldConstraints::__construct()

public function __construct(int|float|null $min = null, int|float|null $max = null, ?int $minLength = null, ?int $maxLength = null, ?Milpa\Live\Schema\RegexPattern $pattern = null, ?array $enumOptions = null):

Parameters

Parameters of __construct()
NameTypeDescription
$minint|float|null
$maxint|float|null
$minLength?int
$maxLength?int
$pattern?Milpa\Live\Schema\RegexPattern
$enumOptions(list<(int | float | string)> | null)