10000 [Form] Form should not swallow TransformationFailedException. by dtee · Pull Request #703 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Form should not swallow TransformationFailedException. #703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversatio 8000 ns
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Form needs to throw exception when DateTime Transform fail. Added use…
…ful information to form view - original child form name (before the concatenation with parent ids).' did not match any file(s) known to git
  • Loading branch information
dtee committed Apr 29, 2011
commit 3217870c6462c91bbc30deec1ba3a7627a5bc367
2 changes: 2 additions & 0 deletions src/Symfony/Component/Form/Extension/Core/Type/FieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function buildForm(FormBuilder $builder, array $options)

public function buildView(FormView $view, FormInterface $form)
{
$formName = $form->getName();
if ($view->hasParent()) {
$parentId = $view->getParent()->get('id');
$parentName = $view->getParent()->get('name');
Expand All @@ -67,6 +68,7 @@ public function buildView(FormView $view, FormInterface $form)

$view->set('form', $view);
$view->set('id', $id);
$view->set('form_name', $formName);
$view->set('name', $name);
$view->set('errors', $form->getErrors());
$view->set('value', $form->getClientData());
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Form/Form.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ public function bind($clientData)
$normData = $this->clientToNorm($clientData);
$synchronized = true;
} catch (TransformationFailedException $e) {
throw $e;
}

if ($synchronized) {
Expand Down
0