{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/11260","labels_url":"https://api.github.com/repos/symfony/symfony/issues/11260/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/11260/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/11260/events","html_url":"https://github.com/symfony/symfony/issues/11260","id":36868822,"number":11260,"title":"[Form] Repeated Field Type weird behavior","user":{"login":"tabbi89","id":5837714,"avatar_url":"https://avatars.githubusercontent.com/u/5837714?v=3","gravatar_id":"","url":"https://api.github.com/users/tabbi89","html_url":"https://github.com/tabbi89","followers_url":"https://api.github.com/users/tabbi89/followers","following_url":"https://api.github.com/users/tabbi89/following{/other_user}","gists_url":"https://api.github.com/users/tabbi89/gists{/gist_id}","starred_url":"https://api.github.com/users/tabbi89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabbi89/subscriptions","organizations_url":"https://api.github.com/users/tabbi89/orgs","repos_url":"https://api.github.com/users/tabbi89/repos","events_url":"https://api.github.com/users/tabbi89/events{/privacy}","received_events_url":"https://api.github.com/users/tabbi89/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-07-01T07:35:12Z","updated_at":"2015-02-10T20:11:12Z","closed_at":"2014-10-17T15:30:29Z","body":"In Symfony 2.5 we have **repeated Field Type** lets assume I have a specific type (**ChangePasswordFormType**):\r\n\r\n```\r\npublic function buildForm(FormBuilderInterface $builder, array $options)\r\n{\r\n$builder->add('plainPassword', 'repeated', array(\r\n            'type' => 'password',\r\n            'required' => true,\r\n            'options' => array('translation_domain' => 'FOSUserBundle'),\r\n            'first_options' => array('label' => 'form.new_password'),\r\n            'second_options' => array('label' => 'form.new_password_confirmation'),\r\n            'invalid_message' => 'fos_user.password.mismatch',\r\n));\r\n}\r\n```\r\n\r\nI don't know if this behavior is desired (I didn't find any example and description in documentation) but I can get valid form for different parameters:\r\n\r\n```\r\n$form->submit(['plainPassword' => 'heyhey']);\r\nvar_dump($form->isValid()); // TRUE\r\n\r\n$form->submit(['plainPassword' => ['first' => 'heyhey', 'second' => 'heyhey']]);\r\nvar_dump($form->isValid()); // TRUE\r\n```\r\n\r\nFor me it is weird because first and second password aren't validated I can prepare a request that avoid this validation?"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/73774279","html_url":"https://github.com/symfony/symfony/issues/11260#issuecomment-73774279","issue_url":"https://api.github.com/repos/symfony/symfony/issues/11260","id":73774279,"user":{"login":"peshi","id":782150,"avatar_url":"https://avatars.githubusercontent.com/u/782150?v=3","gravatar_id":"","url":"https://api.github.com/users/peshi","html_url":"https://github.com/peshi","followers_url":"https://api.github.com/users/peshi/followers","following_url":"https://api.github.com/users/peshi/following{/other_user}","gists_url":"https://api.github.com/users/peshi/gists{/gist_id}","starred_url":"https://api.github.com/users/peshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peshi/subscriptions","organizations_url":"https://api.github.com/users/peshi/orgs","repos_url":"https://api.github.com/users/peshi/repos","events_url":"https://api.github.com/users/peshi/events{/privacy}","received_events_url":"https://api.github.com/users/peshi/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T20:11:12Z","updated_at":"2015-02-10T20:11:12Z","body":"Just came across this ticket\r\nhttps://github.com/FriendsOfSymfony/FOSUserBundle/issues/1723\r\n\r\n@webmozart This is still an issue.\r\nThe DBAL Exception can of course be omitted by adding a NotNull constraint on the password property, but since it doesn't have an errorPath we can't see the error message in forms.\r\n\r\n"}}