first commit
This commit is contained in:
16
plugins/jquery-validation/polish/validator.number-max.js
Normal file
16
plugins/jquery-validation/polish/validator.number-max.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/* eslint-disable func-names */
|
||||
|
||||
/* Validator number max */
|
||||
jQuery.validator.addMethod(
|
||||
"number_max",
|
||||
function(value, element, param) {
|
||||
let val = value;
|
||||
val = val.replace(",", ".");
|
||||
const isNumber =
|
||||
!isNaN(parseFloat(val)) &&
|
||||
isFinite(val) &&
|
||||
parseFloat(val) <= parseFloat(param);
|
||||
return this.optional(element) || isNumber;
|
||||
},
|
||||
"Proszę wpisać wartość mniejszą lub równą {0}."
|
||||
);
|
||||
Reference in New Issue
Block a user