class Illuminate / Validation / Rules / RequiredIf

RequiredIf

Properties

public

$condition callable|bool

The condition that validates the attribute.

Default: null

Methods

public

__construct ( $condition ) : void

Create a new required validation rule based on a condition.

Parameters

  • $condition callable|bool
public

__toString ( ) : string

Convert the rule to a validation string.