I am currently using this code for my email validation:
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
the problem is it still accepts emails with spaces like ab c@gmail.com.
I've tried a lot of variations of the code that should not allow spaces, but instead of refreshing the page with an error message at the top of the form, it gives me this error:
The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option?