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();
0

you need to use this

<script type="text/javascript">
//<![CDATA[
    var validatoryourForm = new VarienForm('your-form-Id', true);
//]]>
</script>
  • i have done but nothing happen – imtiaz Feb 8 '17 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 '17 at 6:17
  • this is my form code – imtiaz Feb 8 '17 at 6:17
  • <script type="text/javascript"> //< ![CDATA[ var validatoryourForm = new VarienForm('varification-sms-code', true); //]]> </script> – imtiaz Feb 8 '17 at 6:17
  • and this is script – imtiaz Feb 8 '17 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.