View Full Version : validating forms
sarala
06-07-2001, 06:34 AM
Could you tell me how to validate feedback forms in Flash?
Jesse
06-07-2001, 09:47 AM
that depends on what sort of data is being enterred. before you repost remember to do a search and see if the type of validation you're after has been coverred already. I know we've coverred names and emails. if you have other stuff, reply here and we'll help out.
Hi..
Follows is one of the examples Jesse was refering to:
on (release) {
if (email.indexOf(" ") != -1 || email.indexOf("@") == -1 || email.indexOf(".") == -1 ||email.length<6||email.lastIndexOf(".")<email.indexOf("@")) {
show = "Error";
} else {
show = "Correct";
}
}
Place a textfield on your stage named 'show' to output your results.
Good luck.
|
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.