class
Illuminate
/
Validation
/
Rule
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
Rule
Uses
Methods
public
static
can ( $ability , $arguments ) : Can
Get a can constraint builder instance.
Parameters
- $ability string
- $arguments mixed
public
static
when ( $condition , $rules , $defaultRules ) : ConditionalRules
Create a new conditional rule set.
Parameters
public
static
forEach ( $callback ) : NestedRules
Create a new nested rule set.
Parameters
- $callback callable
public
static
unique ( $table , $column ) : Unique
Get a unique constraint builder instance.
Parameters
- $table string
- $column string
public
static
exists ( $table , $column ) : Exists
Get an exists constraint builder instance.
Parameters
- $table string
- $column string
public
static
in ( $values ) : In
Get an in constraint builder instance.
Parameters
- $values Illuminate\...\Arrayable|array|string
public
static
notIn ( $values ) : NotIn
Get a not_in constraint builder instance.
Parameters
- $values Illuminate\...\Arrayable|array|string
public
static
requiredIf ( $callback ) : RequiredIf
Get a required_if constraint builder instance.
Parameters
- $callback callable|bool
public
static
excludeIf ( $callback ) : ExcludeIf
Get a exclude_if constraint builder instance.
Parameters
- $callback callable|bool
public
static
prohibitedIf ( $callback ) : ProhibitedIf
Get a prohibited_if constraint builder instance.
Parameters
- $callback callable|bool
public
static
enum ( $type ) : Enum
Get an enum constraint builder instance.
Parameters
- $type string
public
static
dimensions ( array $constraints ) : Dimensions
Get a dimensions constraint builder instance.
Parameters
- $constraints array