{"issue":{"created_at":"2011-11-29T20:50:30Z","state":"closed","updated_at":"2011-12-05T08:35:05Z","comments":17,"user":{"gravatar_id":"e19d83a9f5cf6323abe9be47a7af73cd","id":496234,"url":"https://api.github.com/users/guillaumepotier","avatar_url":"https://secure.gravatar.com/avatar/e19d83a9f5cf6323abe9be47a7af73cd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"guillaumepotier"},"body":"Hi, I had a nice time with your bundle today ;)\r\n\r\nI faced a tricky problem today with the js validation of a repeated password field. Neither the first password nor the second password (confirmation) had validation cause once repeated the fields took a different name:\r\n\r\n`user_password` becomes `user_password_first` and `user_password_second` by default or event different if you give special names like:\r\n\r\n        $builder->add('password', 'repeated', array(\r\n            'type' => 'password',\r\n            'invalid_message' => 'The password fields must match..',\r\n            'first_name' => 'password',\r\n            'second_name' => 'password_confirm',\r\n        ));`\r\n\r\nI added a `RepeatedValidator.js.twig` to check if second password equals the first one.\r\n\r\nI had also to rework a bit on your code. You used to foreach the constraints and check if they were in fields Asserts, I did the other way, by doing a foreach on fields and checking then their constraints.\r\n\r\nMy *unsolved* problem with this PR is that I was not able to get the `invalid_message` for this repeated constraint.. It is currently hard coded in english in the CacheWarmer... If you have a better idea to enhance that ;)\r\n\r\nBest","assignee":null,"pull_request":{"patch_url":"https://github.com/APY/APYJsFormValidationBundle/pull/2.patch","html_url":"https://github.com/APY/APYJsFormValidationBundle/pull/2","diff_url":"https://github.com/APY/APYJsFormValidationBundle/pull/2.diff"},"id":2392770,"number":2,"labels":[],"title":"Added ReapeatedValidation + tweaked CacheWarmer","html_url":"https://github.com/APY/APYJsFormValidationBundle/issues/2","closed_at":"2011-12-04T22:57:43Z","url":"https://api.github.com/repos/APY/APYJsFormValidationBundle/issues/2","milestone":null},"action":"created","comment":{"created_at":"2011-12-05T08:35:05Z","updated_at":"2011-12-05T08:35:05Z","user":{"gravatar_id":"e19d83a9f5cf6323abe9be47a7af73cd","id":496234,"url":"https://api.github.com/users/guillaumepotier","avatar_url":"https://secure.gravatar.com/avatar/e19d83a9f5cf6323abe9be47a7af73cd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"guillaumepotier"},"body":"Great!\r\n\r\nJe regarde ça 'credi, j'ai un début de semaine assez chargé --'","id":3012942,"url":"https://api.github.com/repos/APY/APYJsFormValidationBundle/issues/comments/3012942"}}