Explorar o código

Merge remote branch 'stloyd/patch-11'

* stloyd/patch-11:
  [Form] Force hidden fields to not have "required" attribute (#1091)
Fabien Potencier %!s(int64=14) %!d(string=hai) anos
pai
achega
3b0089967f

+ 3 - 0
src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php

@@ -18,6 +18,9 @@ class HiddenType extends AbstractType
     public function getDefaultOptions(array $options)
     {
         return array(
+            // Force hidden fields to be not required
+            // More info: https://github.com/symfony/symfony/issues/1091
+            'required'       => false,
             // Pass errors to the parent
             'error_bubbling' => true,
         );