Phone:
Code:
a = document.schedule.phone.value/2
if (isNaN(a))
{
alert ( "Wrong format for 'Phone'" );
valid = false;
}
Name:
Code:
b = document.schedule.name.value
d = b.length
c = document.schedule.name.value
for(i=0;i<d;i++)
{
if(c.charAt(i)=='0' || c.charAt(i)=='1' || c.charAt(i)=='2' || c.charAt(i)=='3' || c.charAt(i)=='4' || c.charAt(i)=='5' || c.charAt(i)=='6' || c.charAt(i)=='7' || c.charAt(i)=='8' || c.charAt(i)=='9' || c.charAt(i)==',' || c.charAt(i)==';' || c.charAt(i)=='=' || c.charAt(i)=='+' || c.charAt(i)=='-' || c.charAt(i)=='_' || c.charAt(i)=='!' || c.charAt(i)=='@' || c.charAt(i)=='#' || c.charAt(i)=='$' || c.charAt(i)=='%' || c.charAt(i)=='^' || c.charAt(i)=='&' || c.charAt(i)=='(' || c.charAt(i)=='*' || c.charAt(i)==')')
{
alert("Wrong format for 'Name'")
break
}
}
DOB:
Code:
g = document.schedule.dob.value/2
if (isNaN(g))
{
alert ( "Wrong format for 'DOB'" );
valid = false;
}