8000 [Form] tweaked an error message · 77web/symfony@d950041 · GitHub
[go: up one dir, main page]

Skip to content

Commit d950041

Browse files
committed
[Form] tweaked an error message
1 parent 6e96acc commit d950041

File tree

Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ public function create($name, $type = null, array $options = array())
568568
);
569569
} else {
570570
if (!$this->dataClass) {
571-
throw new FormException('The data class must be set to automatically create children');
571+
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));
572572
}
573573

574574
$builder = $this->getFormFactory()->createBuilderForProperty(