5 ms·
Forgot the SOL/EOL markers; the above will still match a substring, e.g. xxx@xxx@xxx.com. Try: ^[^ @]+@[^ @]+$ That said, HTML5 has something even better if t
by Tautologistics 13y ago
Forgot the SOL/EOL markers; the above will still match a substring, e.g. xxx@xxx@xxx.com. Try:
^[^ @]+@[^ @]+$
That said, HTML5 has something even better if the input is expected to be an email address: input@type=email
See http://www.w3.org/TR/html-markup/input.email.html http://www.w3.org/TR/html-markup/input.email.html for more details.