posted 20 years ago
I'm trying to validate the contents of a textarea using the following regex. I've had no trouble validating text fields using this regex but the textarea check always fails.
var chkPasswordQA = /^[A-Za-z]$/;
if (form.forgottenPasswordQuestion.value.search(chkPasswordQA) == -1) {
errmsg = errmsg+"\n"+(arrErrField.length+1)+". error ";
form action="go.jsp" method="post" name="form" onSubmit="return validate(this);"
textarea rows="3" cols="50" name="forgottenPasswordQuestion"></textarea>
[/CODE]