Skip to main content
Participant
October 20, 2011
Question

Need help with email validation

  • October 20, 2011
  • 1 reply
  • 486 views

I have an asp form with the following code:

<p><form action="aspform.asp"  formname="myform" method="post" >

              <p><span class="style11">email</span>:

                <input name="firstname" type="hidden" value='<%=session("firstname")%>' />

                <input name="lastname" type="hidden" value='<%=session("lastname")%>' />

                <input name="acct" type="hidden" value='<%=session("acct")%>' />

                <input name="password" type="hidden" value='<%=session("password")%>' />

                <input name="coupon" type="hidden" value='<%=session("coupon")%>' />

                <input name="textfield" type="required" class="style1" id="textfield" size="50" />

                <span class="style6 style2">

                              <input type="submit" name="Submit" id="Submit" value="Submit" />

The last field "textfield" is for entry of an email address.  How can I validate that without creating a separate form?  I need to keep all of the fields in tact as they pass on to my "aspform.asp" which posts the data to a database.

Any help would be appreciated.

This topic has been closed for replies.

1 reply

Participating Frequently
October 20, 2011

Just add server side code conditional statement that evaluates the field and then flags it on error, otherwise process the data. If you need more details then we need to know exactly what you mean by "validate" and need to see the entire script.