{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/28455","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/28455/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/28455/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/28455/events","html_url":"https://github.com/symfony/symfony/issues/28455","id":359540704,"node_id":"MDU6SXNzdWUzNTk1NDA3MDQ=","number":28455,"title":"DateTime passes validation in form collection when using DateTimeType with single_text","user":{"login":"alex2005git","id":3526365,"node_id":"MDQ6VXNlcjM1MjYzNjU=","avatar_url":"https://avatars3.githubusercontent.com/u/3526365?v=4","gravatar_id":"","url":"https://api.github.com/users/alex2005git","html_url":"https://github.com/alex2005git","followers_url":"https://api.github.com/users/alex2005git/followers","following_url":"https://api.github.com/users/alex2005git/following{/other_user}","gists_url":"https://api.github.com/users/alex2005git/gists{/gist_id}","starred_url":"https://api.github.com/users/alex2005git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex2005git/subscriptions","organizations_url":"https://api.github.com/users/alex2005git/orgs","repos_url":"https://api.github.com/users/alex2005git/repos","events_url":"https://api.github.com/users/alex2005git/events{/privacy}","received_events_url":"https://api.github.com/users/alex2005git/received_events","type":"User","site_admin":false},"labels":[{"id":100079,"node_id":"MDU6TGFiZWwxMDAwNzk=","url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02","default":false},{"id":99594,"node_id":"MDU6TGFiZWw5OTU5NA==","url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD","default":false},{"id":237003792,"node_id":"MDU6TGFiZWwyMzcwMDM3OTI=","url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed","default":false},{"id":2932845,"node_id":"MDU6TGFiZWwyOTMyODQ1","url":"https://api.github.com/repos/symfony/symfony/labels/Unconfirmed","name":"Unconfirmed","color":"444444","default":false},{"id":99599,"node_id":"MDU6TGFiZWw5OTU5OQ==","url":"https://api.github.com/repos/symfony/symfony/labels/Validator","name":"Validator","color":"DDDDDD","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-12T15:40:58Z","updated_at":"2018-09-13T11:31:02Z","closed_at":null,"author_association":"NONE","body":"**Symfony version(s) affected**: 4.1.4\r\n\r\n**Description**  \r\nI have these 2 entities, Test and TestTest.\r\nTestTest has 2 datetime fields, datetimeStart, and datetimeEnd, both `@Assert\\NotBlank()` and `@Assert\\DateTime()`\r\nTestTest has a ManyToOne relation to Test.\r\nTestType sets testTests as a collection of TestTestType and TestTestType has datetimeStart, and datetimeEnd both as `'widget' => 'single_text', 'date_format' => 'yyyy-MM-dd HH:mm:ss',`\r\n\r\nIf we go to `test_new` (index redirects here) and submit the form without data we see that not blank works https://i.imgur.com/D8QZvCg.jpg\r\n\r\nReset the page, and set the datetimeStart (or end) to `test`, and it shows correctly that the value is not valid https://i.imgur.com/YKmhilM.jpg\r\n\r\nReset again and set the datetimeStart to `a`, `m`, `y`, `x` whatever character and it gets transformed to a date and passes validation https://i.imgur.com/uo7VvbW.jpg\r\n\r\nI don't think this is intended behaviour... What I need it to do is DateTimeValidator should check for the value (`x`) in this example, and return an error that the format is not valid\r\n\r\n**How to reproduce**  \r\nhttps://github.com/alex2005git/symfony_form_validator_datetime\r\nClone the repo, modify `.env` with the DATABASE_URL and database name `symfony_form_validator_datetime` and run `composer initDB` to create the table and update the schema\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/420975030","html_url":"https://github.com/symfony/symfony/issues/28455#issuecomment-420975030","issue_url":"https://api.github.com/repos/symfony/symfony/issues/28455","id":420975030,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDk3NTAzMA==","user":{"login":"ro0NL","id":1047696,"node_id":"MDQ6VXNlcjEwNDc2OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/1047696?v=4","gravatar_id":"","url":"https://api.github.com/users/ro0NL","html_url":"https://github.com/ro0NL","followers_url":"https://api.github.com/users/ro0NL/followers","following_url":"https://api.github.com/users/ro0NL/following{/other_user}","gists_url":"https://api.github.com/users/ro0NL/gists{/gist_id}","starred_url":"https://api.github.com/users/ro0NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ro0NL/subscriptions","organizations_url":"https://api.github.com/users/ro0NL/orgs","repos_url":"https://api.github.com/users/ro0NL/repos","events_url":"https://api.github.com/users/ro0NL/events{/privacy}","received_events_url":"https://api.github.com/users/ro0NL/received_events","type":"User","site_admin":false},"created_at":"2018-09-13T11:31:02Z","updated_at":"2018-09-13T11:31:02Z","author_association":"CONTRIBUTOR","body":"I'm not sure i follow your problem. Any `\\DateTime` value is a valid date time by definition (hence we deprecated validating those using `DateTimeValidator`).\r\n\r\n"}}
{"actor":{"display_login":"ro0NL"}}