{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/55ae9bb3ed56705d67cdce4c7c4eff6f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"55ae9bb3ed56705d67cdce4c7c4eff6f","url":"https://api.github.com/users/mgatto","login":"mgatto","id":341379},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-01T18:46:53Z","comments":0,"closed_at":null,"url":"https://api.github.com/repos/symfony/symfony/issues/2536","body":"Setting the **required** form element attribute  to **false** should not trigger Entity validators. In this example, a Doctrine2 entity has the NotBlank validator which sets required=\"true\" when guessing (using Symfony 2.0.0) :\r\n\r\n```php\r\n<?php\r\n//Entity/Profile.php\r\nstatic public function loadValidatorMetadata(ClassMetadata $metadata)\r\n{\r\n    /** Research Area */\r\n    $metadata->addPropertyConstraint('research_area', new Assert\\NotBlank(array(\r\n        'message' => 'Research Area is required',\r\n    )));\r\n}\r\n```\r\n\r\nHowever, the form explicitly says the field is not required:\r\n\r\n```php\r\n<?php\r\n//ProfileForm.php\r\n$builder->add('research_area', 'entity', array(\r\n    'class' => 'Entities\\ResearchArea',\r\n    'property' => 'name',\r\n    'required' => false,\r\n    'multiple' => false,\r\n));\r\n```\r\n","html_url":"https://github.com/symfony/symfony/issues/2536","title":"Form \"required=false\" Attribute Clashes with NotBlank Validator in Entity","number":2536,"id":2113628,"created_at":"2011-11-01T18:46:53Z"},"action":"opened"}