0

I create form on success page with id varification-sms-code and add class input-text required-entry validate-email but not working

var validator = new Validation('varification-sms-code', {immediate : true});
validator.validate();
1
  • what logic for this validation class Feb 8, 2017 at 6:16

2 Answers 2

0

you need to use this

<script type="text/javascript">
//<![CDATA[
    var validatoryourForm = new VarienForm('your-form-Id', true);
//]]>
</script>
8
  • i have done but nothing happen
    – imtiaz
    Feb 8, 2017 at 6:16
  • <div class="verification_form" style="display:none"> <form id="varification-sms-code"> <input id="mobile-number" name="mobile_varification_number" type="text" class="input-text required-entry validate-email" > <input type="button" class="button" onclick="return mobileConfirmation();" value="Send"> </form> </div>
    – imtiaz
    Feb 8, 2017 at 6:17
  • this is my form code
    – imtiaz
    Feb 8, 2017 at 6:17
  • <script type="text/javascript"> //< ![CDATA[ var validatoryourForm = new VarienForm('varification-sms-code', true); //]]> </script>
    – imtiaz
    Feb 8, 2017 at 6:17
  • and this is script
    – imtiaz
    Feb 8, 2017 at 6:17
0

You can use the following code :

 <script type="text/javascript">
   //<![CDATA[
     var validator = new VarienForm('varification-sms-code', true);
   //]]>
 </script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.