Skip to content

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

Merged
merged 5 commits into from
Jun 22, 2013
Merged

add error_mapping form option documentation #2694

merged 5 commits into from
Jun 22, 2013

Conversation

docteurklein
Copy link
Contributor

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

| 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:
Copy link
Contributor Author

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.

@wouterj
Copy link
Member

wouterj commented Jun 4, 2013

You also need to include this is relevant form fields, otherwise this document is useless

@docteurklein
Copy link
Contributor Author

Yes, I was not sure to include all the example from the news blog post. Should I ?

@wouterj
Copy link
Member

wouterj commented Jun 4, 2013

And you need to add a veresionadded 2.1 directive

@wouterj
Copy link
Member

wouterj commented Jun 4, 2013

@docteurklein I meaned you need to include this is in one or more form field reference documents (e.g, reference/forms/types/form )

@docteurklein
Copy link
Contributor Author

ha! yes indeed. I discussed it with @weaverryan and will do that as soon as possible.

@docteurklein
Copy link
Contributor Author

@wouterj here it is.

@wouterj
Copy link
Member

wouterj commented Jun 12, 2013

thanks @docteurklein However 2 things:

  • be sure to line the last | of the table row at the same level as the others, otherwise the table will broken
  • wrap the lines after the first word that crosses the 72th character

@docteurklein
Copy link
Contributor Author

ok thanks! Forgot to check that.

@docteurklein
Copy link
Contributor Author

@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.
Copy link
Member

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)

@wouterj
Copy link
Member

wouterj commented Jun 13, 2013

👍 (except that last comment), thank you!

@docteurklein
Copy link
Contributor Author

my pleasure !

weaverryan added a commit that referenced this pull request Jun 22, 2013
add error_mapping form option documentation
@weaverryan weaverryan merged commit 0c0ebda into symfony:2.1 Jun 22, 2013
weaverryan added a commit that referenced this pull request Jun 22, 2013
@weaverryan
Copy link
Member

Brilliant guys! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants