Skip to content

[Validator] Label regex in date validator #34705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2019

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy