Skip to content

Conversation

@kristofvc
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets /
License MIT
Doc PR

This change makes sure that when extending the DateValidator you can easily change the format withouth changing anything else.
eg. you can change the pattern to
/^(?<day>\d{2})/(?<month>\d{2})/(?<year>\d{4})$/ but the implementation still checks your date correctly.

@kristofvc kristofvc force-pushed the labeled-date-validator branch from 23cb7fc to ec09f7e Compare November 29, 2019 20:05
@fabpot
Copy link
Member

fabpot commented Nov 30, 2019

Thank you @kristofvc.

fabpot added a commit that referenced this pull request Nov 30, 2019
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Validator] Label regex in date validator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | /
| License       | MIT
| Doc PR        |

This change makes sure that when extending the DateValidator you can easily change the format withouth changing anything else.
eg. you can change the pattern to
`/^(?<day>\d{2})/(?<month>\d{2})/(?<year>\d{4})$/` but the implementation still checks your date correctly.

Commits
-------

ec09f7e Label regex in date validator
@fabpot fabpot merged commit ec09f7e into symfony:master Nov 30, 2019
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.1 May 4, 2020
@fabpot fabpot mentioned this pull request May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants