DateEqualOrAfterRule
in package
implements
Rule
Table of Contents
Interfaces
- Rule
Properties
Methods
- __construct() : mixed
- This rule is used for validating if the current datetime value is equal or after the datetime target.
- message() : string
- Get the validation error message.
- passes() : bool
- Determine if the validation rule passes.
- setMessage() : DateEqualOrAfterRule
- setTarget() : DateEqualOrAfterRule
- target() : Carbon
Properties
$message
private
string
$message
$target
private
Carbon
$target
Methods
__construct()
This rule is used for validating if the current datetime value is equal or after the datetime target.
public
__construct([Carbon|null $target = null ][, string|null $message = null ]) : mixed
Parameters
- $target : Carbon|null = null
-
The target to compare to. If null provided, the current value will be compared to now.
- $message : string|null = null
-
A custom message if current value fails the valuation.
message()
Get the validation error message.
public
message() : string
Return values
stringpasses()
Determine if the validation rule passes.
public
passes(string $attribute, mixed $value) : bool
Parameters
- $attribute : string
- $value : mixed
Tags
Return values
boolsetMessage()
public
setMessage(string $message) : DateEqualOrAfterRule
Parameters
- $message : string
Return values
DateEqualOrAfterRulesetTarget()
public
setTarget(Carbon $target) : DateEqualOrAfterRule
Parameters
- $target : Carbon
Return values
DateEqualOrAfterRuletarget()
public
target() : Carbon