Base
trait Base
| internal |
Methods
Sets a pre-normalization callback applied to the raw input value before any validation.
Casts the validated value to a built-in type or instantiates the given class.
Adds a post-validation transformation callback. The handler may also report errors via Context.
Adds a custom validation assertion; optionally describe it for error messages.
Marks the item as deprecated; emits a warning with the given message when the item is used.
Details
at line 32
Base
default(mixed $value)
No description
at line 39
Base
required(bool $state = true)
No description
at line 50
Base
before(callable $handler)
Sets a pre-normalization callback applied to the raw input value before any validation.
at line 60
Base
castTo(string $type)
Casts the validated value to a built-in type or instantiates the given class.
at line 70
Base
transform(callable $handler)
Adds a post-validation transformation callback. The handler may also report errors via Context.
at line 81
Base
assert(callable $handler, string|null $description = null)
Adds a custom validation assertion; optionally describe it for error messages.
at line 100
Base
deprecated(string $message = 'The item %path% is deprecated.')
Marks the item as deprecated; emits a warning with the given message when the item is used.
at line 107
mixed
completeDefault(Context $context)
No description
at line 121
mixed
doNormalize(mixed $value, Context $context)
No description