$type public property (available since version 2.0.8)
The type of the validator. Indicates, whether a date, time or datetime value should be validated. This property influences the default value of $format and also sets the correct behavior when $format is one of the intl short formats, short
, medium
, long
, or full
.
This is only effective when the PHP intl extension is installed.
This property can be set to the following values:
- TYPE_DATE - (default) for validating date values only, that means only values that do not include a time range are valid.
- TYPE_DATETIME - for validating datetime values, that contain a date part as well as a time part.
- TYPE_TIME - for validating time values, that contain no date information.
Please login to continue.