MetaFox

DateEqualOrAfterRule
in package
implements Rule

Table of Contents

Interfaces

Rule

Properties

$message  : string
$target  : Carbon

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

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
string

passes()

Determine if the validation rule passes.

public passes(string $attribute, mixed $value) : bool
Parameters
$attribute : string
$value : mixed
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
bool

        
On this page

Search results