class RequiredWith implements ParameterizedRule (View source)

Traits

Properties

protected array $fields

Methods

string
__toString()

Convert the rule to a validation string.

string
formatParameters(array $parameters)

Format parameters for a legacy validation rule string.

__construct(array|string $fields)

Create a new required_with rule instance.

array
toArray()

Get the rule name followed by its parameters.

Details

string __toString()

Convert the rule to a validation string.

Return Value

string

protected string formatParameters(array $parameters)

Format parameters for a legacy validation rule string.

Parameters

array $parameters

Return Value

string

__construct(array|string $fields)

Create a new required_with rule instance.

Parameters

array|string $fields

array toArray()

Get the rule name followed by its parameters.

Return Value

array