-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
add error_mapping form option documentation #2694
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
Conversation
| Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes | Applies to | 2.1+ | Fixed tickets | ~ see http://symfony.com/blog/form-goodness-in-symfony-2-1#error-mapping-fu
|
||
With customized error mapping, you can do better: make the error be mapped to the city field. | ||
|
||
Here are to understand the left and the right side of the mapping: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the rules to understand.
You also need to include this is relevant form fields, otherwise this document is useless |
Yes, I was not sure to include all the example from the news blog post. Should I ? |
And you need to add a veresionadded 2.1 directive |
@docteurklein I meaned you need to include this is in one or more form field reference documents (e.g, reference/forms/types/form ) |
ha! yes indeed. I discussed it with @weaverryan and will do that as soon as possible. |
@wouterj here it is. |
thanks @docteurklein However 2 things:
|
ok thanks! Forgot to check that. |
@wouterj I think it's ok now. |
* The right side contains simply the names of fields in the form. | ||
|
||
.. versionadded:: 2.1 | ||
The ``error_mapping`` option is new to Symfony 2.1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put this directive on line 1 (before the title)
👍 (except that last comment), thank you! |
my pleasure ! |
add error_mapping form option documentation
Brilliant guys! Thanks! |
see http://symfony.com/blog/form-goodness-in-symfony-2-1#error-mapping-fu