/ Published in: Ruby
Expand |
Embed | Plain Text
validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => 'email must be valid'
Comments
Subscribe to comments
You need to login to post a comment.

testevilcode;@test.com passes as valid ;)
... but snipplr is smart enough to filter it. There are HTML script tags around the evilcode.
This one works well actually.