Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Validator] Fix a valid Date and Time constraint format#17746
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedJan 16, 2023
I think the previous formats were meant to be human-readable and not something that you could pass to |
adnen-chouibi commentedJan 16, 2023
The Date constraint accepts only one format as mentioned in the example, $birthday it should be a string "Y-m-d" formatted value. |
javiereguiluz commentedMar 22, 2023
In the code examples we mentioned that those were the only valid format ... but I agree that we could be explicit about this in the explanation too. I added some real example too in case any reader needs help with the PHP date formatting letters. @adnen-chouibi thanks and congrats on your first Symfony Docs contribution 🎉 |
Uh oh!
There was an error while loading.Please reload this page.
I noticed that the date and time format specified at the start of the documentation is not correct, it should beY-m-d for Date andH:i:s for Time instead of YYYY-MM-DD and HH:MM:SS