class
Illuminate
/
Validation
/
Rules
/
RequiredIf
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
RequiredIf
Implements
- Stringable
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.