Explorar o código

[Form] tweaked an error message

Fabien Potencier %!s(int64=14) %!d(string=hai) anos
pai
achega
d9500418cd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Symfony/Component/Form/FormBuilder.php

+ 1 - 1
src/Symfony/Component/Form/FormBuilder.php

@@ -568,7 +568,7 @@ class FormBuilder
             );
         } else {
             if (!$this->dataClass) {
-                throw new FormException('The data class must be set to automatically create children');
+                throw new FormException(sprintf('The "%s" form children type cannot be guessed as the data class is not set. Provide the type manually (\'text\', \'password\', ...) or set the data class.', $name));
             }
 
             $builder = $this->getFormFactory()->createBuilderForProperty(