YaWK  24.1
Yet another WebKit
validationHelper.js
Go to the documentation of this file.
1 $(document).ready(function() { // wait until document is ready
2  $(function() {
3  $('[data-toggle="tooltip"]').tooltip();
4  });
5 
6  // RUN AJAX TIMER
7  initTimer();
8 
9  // set a timeout so that ajax calls will be delayed
10  function initTimer(){
11  var myTimer = 0;
12  $("#installerForm").on('keydown', function() {
13  // cancel any previously-set timer
14  if (myTimer) {
15  clearTimeout(myTimer);
16  }
17 
18  myTimer = setTimeout(function() {
19  // call validation settings
20  checkForm();
21  }, 200); //delay time in milliseconds
22  });
23  }
24 
25  function checkForm(){
26  $('#installerForm').validate({ // initialize the plugin
27  errorPlacement: function(error, element) {
28  error.insertBefore(element);
29  },
30  rules: {
31  USERNAME: {
32  minlength: 4,
33  maxlength: 48,
34  remote: {
35  url: "system/plugins/signup/js/check-username.php",
36  type: "post"
37  }
38  },
39  EMAIL: {
40  email: true,
41  maxlength: 128
42  },
43  PASSWORD: {
44  minlength: 4,
45  maxlength: 48
46  },
47  PASSWORD2: {
48  minlength: 4,
49  maxlength: 48,
50  equalTo: "#PASSWORD"
51  }
52  },
53  messages: {
54  USERNAME: {
55  remote: "Please select another username.  "
56  },
57  PASSWORD2: {
58  equalTo: "Passwords do not match.  "
59  }
60  }
61  });
62  } // END function check form
63 
64 }); // END document ready
FuckAdBlock prototype on
Definition: fuckAdBlock.js:227
c jPlayer error
type
Definition: menu-new.php:35
document ready(function() { $(function() { $('[data-toggle="tooltip"]').tooltip();});initTimer();function initTimer(){ var myTimer=0;$("#installerForm").on('keydown', function() { if(myTimer) { clearTimeout(myTimer);} myTimer=setTimeout(function() { checkForm();}, 200);});} function checkForm(){ $('#installerForm').validate({ errorPlacement:function(error, element) { error.insertBefore(element);}, rules:{ USERNAME:{ minlength:4, maxlength:48, remote:{ url:"system/plugins/signup/js/check-username.php", type:"post" } }, EMAIL:{ email:true, maxlength:128 }, PASSWORD:{ minlength:4, maxlength:48 }, PASSWORD2:{ minlength:4, maxlength:48, equalTo:"#PASSWORD" } }, messages:{ USERNAME:{ remote:"Please select another username.  " }, PASSWORD2:{ equalTo:"Passwords do not match.  " } } });} })