Skip navigation
Currently Being Moderated

Validation script

Dec 8, 2012 3:14 PM

Hello and thanks for viewing.


I have the following script that needs some massaging. The goal is to allow only numeric entries with NO spaces and both a min and max of 10 characters. In other words a ten digit phone number only. I have the max but I don't know the rest. Can someone advise please and thanks in advance.







<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>

<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">

<form action="" method="post">

<span id="sprytextfield1">

<input name='id_number' type='text' id='id_number' maxlength="10" />

<span class="textfieldRequiredMsg">A 10 digit phone number is required.</span></span>

<input value='Go' type='submit' />


<script type="text/javascript">


var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");




More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points