Forum: Ruby on Rails Using a RegExp to exclude an email address

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jasbur (Guest)
on 2006-06-06 21:50
How would I use a regular expression to eclude an email address? I'm
using validates_format_of       :username,
                          :with =>
                          :message => "Your username cannot be an email

What is the expression to use after "with: =>" to exclude an "@"?
This topic is locked and can not be replied to.