I'm trying to create a form that have some optional fields (leave them blank), to do this i've added the required => false option to the formbuilder...
$builder->add('twitter', 'url', array('required' => 'false'));
The Entity doesn't have any Validation Constraints...
/**
* @var string
*
* @ORM\Column(name="twitter", type="string", length=50)
*/
private $twitter;
Also tried to clear the cache in dev, prod with debug true/false. But the form still have the required attribute when it loads :$
<input type="url" id="post_add_twitter" name="post_add[twitter]" required="required" />
My setup passes the php app/check.php
What i'm doing wrong ?
EDITED: Symfony version 2.1.7, PHP version 5.4.7