You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically the same but changing the start and end removed the multiline anchors error for me.
OLD uses ^ and $: Matches start/end of any line
NEW uses \A and \z: Matches start/end of entire string
Not sure if this is correct as this is my first contribution but I came across and thought I would drop it in.
Cheers
The text was updated successfully, but these errors were encountered:
devise/test/rails_app/config/initializers/devise.rb
Line 102 in 12c796e
Environment
Current behaviour
I ran into a failing test with Rspec on the valid email check
The original regex here;
config.email_regexp =/^([\w.%+-]+)@([\w-]+.)+([\w]{2,})$/i
was failing on a new line error
Solution
I corrected to
/\A([\w.%+-]+)@([\w-]+.)+([\w]{2,})\z/i
Basically the same but changing the start and end removed the multiline anchors error for me.
OLD uses ^ and $: Matches start/end of any line
NEW uses \A and \z: Matches start/end of entire string
Not sure if this is correct as this is my first contribution but I came across and thought I would drop it in.
Cheers
The text was updated successfully, but these errors were encountered: