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

[1.1] Fix email validation error I18n symbol lookup #2729

Closed
wants to merge 1 commit into
base: 1-1-stable
from

Conversation

Projects
None yet
2 participants
@felixbuenemann
Contributor

felixbuenemann commented Mar 21, 2013

And include %{value} for interpolation in validation messages.
If not specifying a custom validation message or symbol this
will now use the same error message as rails' format validator.

This is the proper fix for the issue mentioned in PR #2364.

I'll create a separate PR to fix this in master (which should also apply to 1.2+).

Fix email validation error I18n symbol lookup
And include %{value} for interpolation in validation messages.
If not specifying a custom validation message or symbol this
will now use the same error message as rails' format validator.

This is the proper fix for the issue mentioned in PR #2364.

felixbuenemann added a commit to felixbuenemann/spree that referenced this pull request Mar 21, 2013

Fix email validation error I18n symbol lookup
And include %{value} for interpolation in validation messages.

The current code hardcodes the I18n key and improperly assigns the error
which leads to several problems:
* You cannot override the translation message for models/attributes
* You cannot pass your own I18n key as a symbol (eg. :invalid_email)
* You cannot use symbol interpolation

This fixes the above problems and is the proper solution for issue spree#2346.

This fix also applies to 1-2-stable and 1-3-stable.
For a fix against 1-1-stable see PR spree#2729.

radar added a commit that referenced this pull request Mar 28, 2013

Fix email validation error I18n symbol lookup
And include %{value} for interpolation in validation messages.

The current code hardcodes the I18n key and improperly assigns the error
which leads to several problems:
* You cannot override the translation message for models/attributes
* You cannot pass your own I18n key as a symbol (eg. :invalid_email)
* You cannot use symbol interpolation

This fixes the above problems and is the proper solution for issue #2346.

This fix also applies to 1-2-stable and 1-3-stable.
For a fix against 1-1-stable see PR #2729.

Fixes #2730
@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Apr 3, 2013

Member

This has been added to 1-1-stable now. Thank you!

Member

radar commented Apr 3, 2013

This has been added to 1-1-stable now. Thank you!

@radar radar closed this Apr 3, 2013

radar added a commit that referenced this pull request Apr 3, 2013

Fix email validation error I18n symbol lookup
And include %{value} for interpolation in validation messages.
If not specifying a custom validation message or symbol this
will now use the same error message as rails' format validator.

This is the proper fix for the issue mentioned in PR #2364.

Fixes #2729

radar added a commit that referenced this pull request Apr 3, 2013

Fix email validation error I18n symbol lookup
And include %{value} for interpolation in validation messages.

The current code hardcodes the I18n key and improperly assigns the error
which leads to several problems:
* You cannot override the translation message for models/attributes
* You cannot pass your own I18n key as a symbol (eg. :invalid_email)
* You cannot use symbol interpolation

This fixes the above problems and is the proper solution for issue #2346.

This fix also applies to 1-2-stable and 1-3-stable.
For a fix against 1-1-stable see PR #2729.

Fixes #2730
@felixbuenemann

This comment has been minimized.

Show comment
Hide comment
@felixbuenemann

felixbuenemann Apr 3, 2013

Contributor

Thanks!

Contributor

felixbuenemann commented Apr 3, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment