Forum: Ruby check for valid email address

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
661ae6e97d0e16c2af2aaf7d197e8387?d=identicon&s=25 Sijo k g (sijo)
on 2008-11-05 08:02
Hi
    I have a text field mail_id I have to prevent the user to enter only
a valid mail id For example user@somdomain.com  Could you please tell
how can I check that?

Thanks in advance
Sijo
4c032774402a9fe5ae814b6318c75a60?d=identicon&s=25 Dennie Mans (wouss)
on 2008-11-05 08:48
Sijo Kg wrote:
> Hi
>     I have a text field mail_id I have to prevent the user to enter only
> a valid mail id For example user@somdomain.com  Could you please tell
> how can I check that?
>
> Thanks in advance
> Sijo

Look into regular expressions and try it yourself
B14575f0ca69f10938fdd67e7156e0e1?d=identicon&s=25 Craig Demyanovich (Guest)
on 2008-11-05 14:21
(Received via mailing list)
On Wed, Nov 5, 2008 at 2:46 AM, Wouss Bla <wvdongen@zonnet.nl> wrote:

> Sijo Kg wrote:
> > Hi
> >     I have a text field mail_id I have to prevent the user to enter only
> > a valid mail id For example user@somdomain.com  Could you please tell
> > how can I check that?
> >
> > Thanks in advance
> > Sijo
>
> Look into regular expressions and try it yourself


This is a good place to start for regular expressions for email:
http://www.regular-expressions.info/email.html . The site itself is good
overall.

Regards,
Craig
This topic is locked and can not be replied to.