Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Latest commit

 

History

History
28 lines (19 loc) · 553 Bytes

maxDate.md

File metadata and controls

28 lines (19 loc) · 553 Bytes

PUGXExtraValidatorBundle Documentation


MaxDate

Usage

In your Entity you must import the namespace:

use PUGX\ExtraValidatorBundle\Validator\Constraints as ExtraAssert;

After that you can use DateRangeValidator just writing relevant assert in annotation of your property:

/**
 * @ExtraAssert\MaxDate(limit="+2 years")
 */
protected $date;

Limit option must be compliant to php documentation: Supported php Date and Time Formats