JQuery Validate – digits of min length of 10 or 13

jquery-validate

How do I create a custom validation rule for the jquery validate plugin that checks against the user's input as either 10 or 13 digits? Thanks much for the help.

Best Solution

Very simple sample of validation

$("#FormToValidatePhoto").validate({
  rules: {
   Title: { minlength: 10, maxlength: 13 }
  },
  messages: {
   Title: { minlength: "Min is 10", maxlength: "Max is 13" }}
});