Validate credit card number : Validation « Dojo toolkit « JavaScript DHTML






Validate credit card number

 

<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojox.validate.web");
      dojo.require("dojox.validate._base");
      dojo.require("dojox.validate.creditCard");
      dojo.require("dojox.validate.isbn");

      
      function testIt() {
        var s = dojox.validate.isValidCreditCardNumber("1111-1111-1111-1111");
        alert(s)

      }
    </script>
  </head>
  <body onLoad="testIt();">
  </body>
</html>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Validate Isbn
2.Validate Luhn number
3.Validate Max length of TextBox
4.Validate email
5.Validate email address
6.Zipcode validation
7.Check phone number format
8.Check number format