Skip to content
docsv0.17.0

FieldType

The base JSON-Schema type of a form field. `enum` is a CONSTRAINT (see FieldConstraints), not a type — coercion always follows the base type here.

FieldType::cases()

public static function cases(): array

FieldType::from()

public static function from(string|int $value): static

Parameters

Parameters of from()
NameTypeDescription
$valuestring|int

FieldType::tryFrom()

public static function tryFrom(string|int $value): ?static

Parameters

Parameters of tryFrom()
NameTypeDescription
$valuestring|int