I am trying to find some tutorials on advanced form validation.
I have a form and I have basic validation (empty, value, etc) but I
would like to validate some forms to stop people from using the form
to spam me or others.
I would like to restrict the value of the email field to just 1 email
value and to not allow urls to be input in the comments or other text
areas.
I have the following:
if (document.form.fullname.value== "http://" )
{
alert("This form will not serve as email relay for spamming
purposes. Enter a real name!");
document.form.fullname.select();
document.form.fullname.focus();
return false;
}
But that only checks if the value *is* http://.....I wanted to
validate for values that *contain* http://.....
As for the email field I validate for values that *don't have* @ or .
but I don't know how to validate to stop the input of more than 1 @...
Can anybody give me a hand on this one?
Thank you in advance,
FayeC