trait Base

internal  
 

Methods

default(mixed $value)

No description

required(bool $state = true)

No description

before(callable $handler)

Sets a pre-normalization callback applied to the raw input value before any validation.

castTo(string $type)

Casts the validated value to a built-in type or instantiates the given class.

transform(callable $handler)

Adds a post-validation transformation callback. The handler may also report errors via Context.

assert(callable $handler, string|null $description = null)

Adds a custom validation assertion; optionally describe it for error messages.

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.

mixed
completeDefault(Context $context)

No description

mixed
doNormalize(mixed $value, Context $context)

No description

Details

at line 32
Base default(mixed $value)

No description

Parameters

mixed $value

Return Value

Base

at line 39
Base required(bool $state = true)

No description

Parameters

bool $state

Return Value

Base

at line 50
Base before(callable $handler)

Sets a pre-normalization callback applied to the raw input value before any validation.

Parameters

callable $handler

Return Value

Base

at line 60
Base castTo(string $type)

Casts the validated value to a built-in type or instantiates the given class.

Parameters

string $type

Return Value

Base

at line 70
Base transform(callable $handler)

Adds a post-validation transformation callback. The handler may also report errors via Context.

Parameters

callable $handler

Return Value

Base

at line 81
Base assert(callable $handler, string|null $description = null)

Adds a custom validation assertion; optionally describe it for error messages.

Parameters

callable $handler
string|null $description

Return Value

Base

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.

Parameters

string $message

Return Value

Base

at line 107
mixed completeDefault(Context $context)

No description

Parameters

Context $context

Return Value

mixed

at line 121
mixed doNormalize(mixed $value, Context $context)

No description

Parameters

mixed $value
Context $context

Return Value

mixed