Commit f132a6de authored by Mat's avatar Mat
Browse files

contrainte sur la saisie de la TVA

parent 16f1b6ab
......@@ -73,11 +73,16 @@ class Association
*
* @ORM\Column(name="Tva", type="string", length=20, nullable=true)
* @Assert\Length(
* min = 3,
* max = 20,
* min = 10,
* max = 15,
* minMessage = "Le champs doit contenir au minimum {{ limit }} caractères",
* maxMessage = "Le champs doit contenir au maximum {{ limit }} caractères"
* )
* @Assert\Regex(
* pattern="/^(?:|BE|BE |BE-)(0[0-9]{3})(?:| |-)([0-9]{3})(?:| |-)([0-9]{3})$/",
* match=true,
* message="Le n° de TVA n'est pas correctement formaté"
* )
*/
private $tva;
......
......@@ -49,6 +49,7 @@ class AssociationType extends AbstractType
'label_attr' => array('class' => 'label-common'),
'attr' => array(
'class' => 'form-control form-control-sm',
'placeholder' => "BE 0000 000 000",
),
));
$builder->add('enregistrer', SubmitType::class, array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment