Form Validation

My form will not validate correctly in IE. I have the form set to require “name”, “email” and “number”, but when i press submit in IE it only requires “name” and “email”. Any solutions?

Thanks,

Samuel:rofl:

My Script
<script>
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors=‘’,args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!=“”) {
if (test.indexOf(‘isEmail’)!=-1) { p=val.indexOf(‘@’);
if (p<1 || p==(val.length-1)) errors+=‘- ‘+nm+’ must contain an e-mail address.
‘;
} else if (test!=‘R’) { num = parseFloat(val);
if (isNaN(val)) errors+=’- ‘+nm+’ must contain a number.
‘;
if (test.indexOf(‘inRange’) != -1) { p=test.indexOf(’:’);
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- ‘+nm+’ must contain a number between ‘+min+’ and ‘+max+’.
';
} } } else if (test.charAt(0) == ‘R’) errors += '- ‘+nm+’ is required.
'; }
} if (errors) alert('The following error(s) occurred:
'+errors);
document.MM_returnValue = (errors == ‘’);
} }
</script

My Form
<form action=“form-process.php” method=“post” target=“_self” onsubmit=“MM_validateForm(‘Name’,‘’,‘R’,‘Number’,‘’,‘R’,‘Email’,‘’,‘RisEmail’);return document.MM_returnValue”>
<label>Name<br/>
<input type=“text” name=“Name” id=“Name” class=“text-field” />
</label><br/>
<label>Number<br/>
<input type=“text” name=“Number” id=“Number” class=“text-field” />
</label><br/>
<label>Email<br/>
<input type=“text” name=“Email” id=“Email” class=“text-field” />
</label><br/>
<label>Address<br/>
<input type=“text” name=“Address” id=“Address” class=“text-field” />
</label><br/>
<label>Requested Date and Time<br/>
<input type=“text” name=“Requested_Date_and_Time” id=“Requested_Date_and_Time” class=“text-field” />
</label><br/>
<label>Preferred Contact<br/>
<input type=“text” name=“Preferred_Contact” id=“Preferred_Contact” class=“text-field” />
</label><br/>
<label>Brief Job Description<br/>
<input type=“text” name=“Brief_Job_Description” id=“Brief_Job_Description” class=“text-area” />
</label>
<br/><br/>
<input type=“image” src=“images/submit.jpg” name=“submit” id=“Submit” />

						&lt;/form&gt;

Just a guess. but “Number” might be a reserved word for JS, so try changing the name to something like myNumber or phone.

Thanks esearing! I tried this with success.