Browse Source

[Form] Fixed textarea_widget (W3C standards)

hlecorche 13 năm trước cách đây
mục cha
commit
78e9b2fedb

+ 10 - 0
src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php

@@ -12,9 +12,19 @@
 namespace Symfony\Component\Form\Extension\Core\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\FormView;
+use Symfony\Component\Form\FormInterface;
 
 class TextareaType extends AbstractType
 {
+    /**
+     * {@inheritdoc}
+     */
+    public function buildView(FormView $view, FormInterface $form)
+    {
+        $view->set('pattern', null);
+    }
+
     /**
      * {@inheritdoc}
      */