Namespace: Sphp \ Validators \ Datetime
The DatetimeFormat validates only that the given input has a non empty value. This differs from empty and thus native boolean conversion in PHP.
Predefined errormessage Template formatting parameters:
:value - the string representation of the validated $value
:type - the datatype of the validated $value
:type = "boolean" - for boolean type
:type = "integer" - for integer type
:type = "float" - for float type
:type = "string" - for string type
:type = "array" - for array type
:type = "object" - for object type
:type = "resource" - for resource type
:type = "resource (closed)" - for closed resource type
:type = "NULL" - for nulls
:type = "unknown type" - for unknown types
:strict-type - the strict datatype of the validated $value differs from :type
any object corresponds to the name of the class get_class() results
Synopsis
Methods: public __construct ( string $format = 'Y-m-d H:i:s' ,
string $errorMessage = 'Please insert correct date and time' )
The EarlierThan validator validates whether a date string input or a Date object is earlier than the limit.
Validator specific predefined errormessage Template formatting parameters:
:limit -
the minumum allowed value of the validated $value
The LaterThan validator validates whether a date string input or a Date object is later than the limit.
Validator specific predefined errormessage Template formatting parameters:
:limit -
the minumum allowed value of the validated $value
External links