first commit
This commit is contained in:
16
plugins/jquery-validation/polish/validator.phone.js
Normal file
16
plugins/jquery-validation/polish/validator.phone.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/* eslint-disable func-names */
|
||||
|
||||
/* Validator phone */
|
||||
jQuery.validator.addMethod(
|
||||
"phone",
|
||||
function(value, element) {
|
||||
const reg = /^[0-9]{9,11}$/;
|
||||
return this.optional(element) || reg.test(value);
|
||||
},
|
||||
"Podaj poprawny numer telefonu."
|
||||
);
|
||||
|
||||
/* Phone validator */
|
||||
jQuery.validator.addClassRules("js-validation-phone", {
|
||||
phone: true,
|
||||
});
|
||||
Reference in New Issue
Block a user