Files
globelus.pl/plugins/jquery-validation/polish/validator.alpha-pl-de.js
2024-11-11 15:28:20 +01:00

17 lines
466 B
JavaScript

/* eslint-disable func-names */
/* Validator alpha with pl and de letters */
jQuery.validator.addMethod(
"alpha_pl_de",
function(value, element) {
const re = /^[a-zA-ZąĄęĘóśŚÓłŁżŻźŹćĆńŃÄäÖöÜüß]+$/;
return this.optional(element) || re.test(value);
},
"Dozwolone są tylko litery."
);
/* Alpha with polish and german letters validator */
jQuery.validator.addClassRules("js-validation-alpha-pl-de", {
alpha_pl_de: true,
});