class RequiredIf (View source)

Properties

callable|bool $condition The condition that validates the attribute.

Methods

void
__construct(callable|bool $condition)

Create a new required validation rule based on a condition.

string
__toString()

Convert the rule to a validation string.

Details

void __construct(callable|bool $condition)

Create a new required validation rule based on a condition.

Parameters

callable|bool $condition

Return Value

void

string __toString()

Convert the rule to a validation string.

Return Value

string