[Form] Fixed typos

This commit is contained in:
Bernhard Schussek 2012-05-21 18:00:31 +02:00
parent ac6939441f
commit af41a1a550
4 changed files with 8 additions and 4 deletions

View File

@ -551,7 +551,7 @@
));
```
After (if the address object is an array):
After:
```
$builder->add('name', 'text', array(

View File

@ -79,10 +79,14 @@ class FormValidator extends ConstraintValidator
}
}
} else {
$clientDataAsString = is_scalar($form->getClientData())
? (string) $form->getClientData()
: gettype($form->getClientData());
// Mark the form with an error if it is not synchronized
$this->context->addViolation(
$form->getAttribute('invalid_message'),
array('{{ value }}' => (string) $form->getClientData()),
array('{{ value }}' => $clientDataAsString),
$form->getClientData(),
null,
Form::ERR_INVALID

View File

@ -64,7 +64,7 @@ class ValidationListener implements EventSubscriberInterface
if (count($violations) > 0) {
foreach ($violations as $violation) {
// Allow the "invalid" constraint to be put onto
// non-synchzronized forms
// non-synchronized forms
$allowNonSynchronized = Form::ERR_INVALID === $violation->getCode();
$this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized);

View File

@ -348,7 +348,7 @@ class Form implements \IteratorAggregate, FormInterface
}
throw new FormException(
'The form\'s client data is expected to of type ' . $expectedType . ', ' .
'The form\'s client data is expected to be of type ' . $expectedType . ', ' .
'but is an instance of class ' . get_class($clientData) . '. You ' .
'can avoid this error by setting the "data_class" option to ' .
'"' . get_class($clientData) . '" or by adding a client transformer ' .