Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Validation help!

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
GB
Hi, how can i modify my code below to also check that the text field does not start or contain and spaces, underscores dashes etc... so it only has numbers or chars??


Code:
<script language="javascript" type="text/javascript">
function checkValue()
{
    if (document.form1.VRM.value == "")
    {    
        document.form1.SubmitButton.disabled=true;
        alert('Please enter a valid UK / Irish Numberplate.');
    } else {
        document.form1.SubmitButton.disabled=false;
    }
}
</script>

Kindet regards,

Brian

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top