symfony/symfony — pull request #8300 by bamarni (2013-06-17 16:19:40+00:00)
Title: [Validator] added before and after options to Date constraints

| Q | A
| ------------- | ---
| Bug fix? | [no]
| New feature? | [yes]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| License | MIT
| Doc PR | [todo]

I've added an after and before options to Date and DateTime constraints. It uses the strtotime function so it's user friendly, values like "now", "+1 week" can be used.

I think it can be very useful, some examples :
- an appointment can't be scheduled before 10 days
- a user must be more than 16 years old (checking the birthday)
- a date must be in the future

What do you think?