Validation - how to allow Return/Enter in a Text Box
Hi, I have a number of html forms for which I am using validation toolkit. when a return / new line is entered into a text box, an error message appears. Is there a way of allowing Enter/Return in the validation? One of the text fields is called Address, and below is the code from the page:
<form action="formmail.php" method="post" name="MortgageForm" id="MortgageForm" onsubmit="WAValidateAN(document.MortgageForm.First_Name,document.MortgageForm.First_Name.value,'First Name : Required / Invalid character in entry',true,true,false,true,'- , ',document.MortgageForm.First_Name,0,true);WAValidateAN(document.MortgageForm.Last_Name,document.MortgageForm.Last_Name.value,'Last Name : Required / Invalid character in entry',true,true,false,true,'- , ',document.MortgageForm.Last_Name,0,true);WAValidateZC(document.MortgageForm.Post_Code,'Post Code : Invalid Post Code / Required',true,true,true,true,'',document.MortgageForm.Post_Code,0,true);WAValidateAN(document.MortgageForm.Daytime_Number,document.MortgageForm.Daytime_Number.value,'Daytime Telephone Number : Required / Numbers only.',false,false,true,true,'- , ',document.MortgageForm.Daytime_Number,0,true);WAValidateEM(document.MortgageForm.email,document.MortgageForm.email.value,'Email Address - Invalid email address / Required.',document.MortgageForm.email,0,true);WAValidateAN(document.MortgageForm.Address,document.MortgageForm.Address.value,'Address : Required / Invalid Characters.',true,true,true,true,'- , . , , , \' , \' &, ',document.MortgageForm.Address,0,true);WAValidateRT(document.MortgageForm.Address,document.MortgageForm.Address.value,'Address - Invalid content in entry','http://|, |',document.MortgageForm.Address,0,true);WAValidateAN(document.MortgageForm.Purchased_Address,document.MortgageForm.Purchased_Address.value,'Purchase Address : Required / Invalid Characters.',true,true,true,true,'- , . , , , \' , \'',document.MortgageForm.Purchased_Address,0,false);WAValidateRT(document.MortgageForm.Purchased_Address,document.MortgageForm.Purchased_Address.value,'Purchase Address - Invalid content in entry','http://|, |',document.MortgageForm.Purchased_Address,0,false);WAValidateEL(document.MortgageForm.spam,document.MortgageForm.spam.value,'- Invalid number of characters in entry',1,1,'',document.MortgageForm.spam,0,false);WAAlertErrors('The following errors were found','Correct invalid entries to continue',true,false);WAValidateEL(document.MortgageForm.spam,document.MortgageForm.spam.value,'spam',1,1,'',document.MortgageForm.spam,0,false);return document.MM_returnValue" >