Hi all,
Im trying to create a form in actiocsript that verifies correct user input before submitting. So far I have the form checking that NewEmail contains characters, an “@” symbol and a “.” symbol.
However is there code that can check that the layout of the email is correct before submitting i.e. <“sometext”@“sometext”.“sometext”>
Also I need to insert a seperate name verifier to check that there are no numbers included in a text box.
This is my code so far:
_global.detailsCheck = function() {
if ( _root.NewEmail.length == 0 | _root.NewEmail.length == “” | _root.NewEmail eq “”) {
// Alerts the user that their password is incorrect
_root.Guide2 = “Please Fill All Detail Fields”;
// Stops the movie from going to the next frame
stop();
} else if (_root.NewEmail.indexOf("@") == -1) {
_root.Guide2 = “Please Give A Valid Email Address”;
stop();
} else if (_root.NewEmail.indexOf(".") == -1) {
_root.Guide2 = “Please Give A Valid Email Address”;
stop();
} else {
//submit details
gotoAndPlay (“ExitFrame”);
}
}
Any help would be much appreciated…