I wanted to change the regex defining a valid email in my application. I'm trying to do it in config / initializers / devise.rb. To check whether regex was working, I tried
config.email_regexp = / \ d + / when that does not work I thought that my knowledge of Ruby's reggae sytax had stopped and what I thought was a super simple reggae
config.email_regexp = / a / While making changes in the following, there is no effect on password permission, so there is no effect in the previous two rows.
config.password_length = 2..128 What else should I do to modify the valid email regex? (After each of these modifications I restarted the server to ensure that the changes were made.)
Do you know the Reggae match is correct?
/ \ d + matches one or more digits, and / a / matches a single 'A', this almost every email address will be invalid, will not it?
To test your regexes, look at this site and see if it helps:
Comments
Post a Comment