Email address field Validation

24 views
Skip to first unread message

Lakshminarayan K V

unread,
Aug 28, 2013, 9:33:31 PM8/28/13
to cenos...@googlegroups.com
Hello
 
I have created PDF form.  In that, I have a field for entering the email address. I would like to validate the email address field to check whether valid email address is entered or not.  '@' should be entered and only once
 
Can anyone help?
 
Thanks in advance
 
Laks

Yang Lu

unread,
Aug 29, 2013, 12:14:58 AM8/29/13
to cenos...@googlegroups.com

Laks,

 

I made a small changes on the regular expression in the code I sent you the other day. It should work for this case now. Just let you know that to fully validate an email address is a lot more than just checking the “@”. You can google it. It should be a pretty complex regular expression.

 

if (!event.value) {

    event.rc = true;

}

else {

    var s = new String(event.value);

    if (s.match(/^[^@]+@[^@]+$/)) {

        event.rc = true;

    }

    else {

        app.alert("Invalid email address");

        event.rc = false;

--
You received this message because you are subscribed to the Google Groups "CenoPDF Support Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cenosupport...@googlegroups.com.
To post to this group, send email to cenos...@googlegroups.com.
Visit this group at http://groups.google.com/group/cenosupport.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages