on 01-19-2009 6:34 PM
Hi,
is there any document for Validation Pattern? i m looking for a way to validate email addresses in my form.
it's going to be something like * @ .
i have no idea of how to do this, or maybe validation pattern is no good? use java script instead?
any advice is appreciated!
thanks.
Hello..
You can find "email address" object in the custom tab of the library. That will have all the validations by default.
Thanks
Gopal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi erv2,
You just need to place this script in the "exit" event of the field that u r using for email address.
var r = new RegExp(); // Create a new Regular Expression Object.
r.compile("^[a-z0-9_\\-\\.]+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,3}$","i");
if( this.rawValue == null || this.rawValue == "")
{
}
else
{
var result = r.test(this.rawValue);
if (result == true) // If it fits the general form,
true;
else
{
xfa.host.messageBox("Please enter a valid email address ");
this.rawValue = "";
false; // fail the validation.
}
}
Thanks
Amita
Edited by: amita arora on Jan 20, 2009 10:44 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.