symfony/symfony — Issue #3308: [Form] `validation_constraint` is not validated
Author: henrikbjorn
Created: 2012-02-09 09:52:13+00:00
State: open

The `validation_constraint` is sometime a much useful feature. I am trying to implement a honeypot via a `AbstractTypeExtension` and wanted to use that option to always have it validate to null.

``` php

add('pottery', 'text', array(
'property_path' => false,
'validation_constraint' => new Constraints\Blank(),
));
}
}

/**
* @return array
*/
public function getDefaultOptions(array $options)
{
return array(
'honeypot' => true,
);
}

/**
* @return string
*/
public function getExtendedType()
{
return 'form';
}
}
```