From c6dbb76ebbfc0a59b0383d696488b302d4ff4044 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Wed, 16 Oct 2013 12:02:59 +0200 Subject: [PATCH] thelia type constraints --- core/lib/Thelia/Form/TaxCreationForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Form/TaxCreationForm.php b/core/lib/Thelia/Form/TaxCreationForm.php index 302e55890..5448d3367 100644 --- a/core/lib/Thelia/Form/TaxCreationForm.php +++ b/core/lib/Thelia/Form/TaxCreationForm.php @@ -65,7 +65,11 @@ class TaxCreationForm extends BaseForm $this->formBuilder ->add($type . '_' . $name, new TheliaType(), array( "instance" => $requirementType, - "constraints" => array(new NotBlank()), + "constraints" => array( + "methods" => array( + array($this, "verifyTaxId"), + ), + ), "attr" => array( "tag" => "requirements", ),