Documentation

ClosureValidationRule
in package
implements Rule

Interfaces, Classes and Traits

Rule

Table of Contents

$callback  : Closure
The callback that validates the attribute.
$failed  : bool
Indicates if the validation callback failed.
$message  : string|null
The validation error message.
__construct()  : void
Create a new Closure based validation rule.
message()  : string
Get the validation error message.
passes()  : bool
Determine if the validation rule passes.

Properties

Methods

__construct()

Create a new Closure based validation rule.

public __construct(Closure $callback) : void
Parameters
$callback : Closure
Return values
void

message()

Get the validation error message.

public message() : string
Return values
string

passes()

Determine if the validation rule passes.

public passes(string $attribute, mixed $value) : bool
Parameters
$attribute : string
$value : mixed
Return values
bool

Search results