Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 664 Bytes

README.md

File metadata and controls

38 lines (32 loc) · 664 Bytes

javascript and jQuery Validation Plugin for Turkish identity validation

vanilla js

TCIdentity(12345678910)

jQuery Validation

declaratively
  <input type="text" name="TCIdentity" value=""
      data-rule-tcno="true"
      data-msg-tcno="gecersiz tc no"
      required />
programmatically
  <input type="text" name="kimlikno" value=""
      required />



$(function() {
  $("#test").validate({
      rules: {
          kimlikno: {
            TCIdentity: true
          },
      },
      messages: {
          kimlikno: {
            TCIdentity:"gecersiz tc no"
          }
      }
  });
});