-
Notifications
You must be signed in to change notification settings - Fork 121
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
Validate Email Language on Registration #5948
Conversation
There's some similar work being done in #5933. Could that help here? |
934bd0c
to
059f893
Compare
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.
LGTM
@@ -4,6 +4,7 @@ class RegisterUserEmailForm | |||
include FormEmailValidator | |||
|
|||
validate :validate_terms_accepted | |||
validates_inclusion_of :email_language, in: I18n.available_locales.map(&:to_s).append(nil) |
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.
👍
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.
👍
059f893
to
5cc7369
Compare
Currently, we do not validate the email language, but the database has a limited size of varchar(10), and invalid submissions longer than that cause a 500
We do validate similarly in
identity-idp/app/forms/update_email_language_form.rb
Line 6 in 9b87bd7