소스 검색

Merge remote branch 'stloyd/patch-11'

* stloyd/patch-11:
  [Form] Force hidden fields to not have "required" attribute (#1091)
Fabien Potencier 14 년 전
부모
커밋
3b0089967f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php

+ 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,
         );