/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => 'email must be valid'