4 Replies Latest reply on Dec 9, 2012 9:56 AM by sudarshan.t

    Validation script


      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="http://www.realtyalerts.ca/MyAlerts/Home/Index" 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");