diff --git a/src/assets/netteForms.js b/src/assets/netteForms.js index cb691b61b..199c973e6 100644 --- a/src/assets/netteForms.js +++ b/src/assets/netteForms.js @@ -171,8 +171,10 @@ Nette.validateControl = function(elem, rules, onlyCheck, value, emptyOptional) { } } - if (!onlyCheck && elem.type === 'number' && !elem.validity.valid) { - Nette.addError(elem, 'Please enter a valid value.'); + if (elem.type === 'number' && !elem.validity.valid) { + if (!onlyCheck) { + Nette.addError(elem, 'Please enter a valid value.'); + } return false; }