We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08b79b9 commit 771091eCopy full SHA for 771091e
src/assets/netteForms.js
@@ -185,13 +185,6 @@
185
}
186
187
188
- if (elem.type === 'number' && !elem.validity.valid) {
189
- if (!onlyCheck) {
190
- Nette.addError(elem, 'Please enter a valid value.');
191
- }
192
- return false;
193
194
-
195
return true;
196
};
197
@@ -234,8 +227,15 @@
234
227
continue;
235
228
236
229
237
- if (!Nette.validateControl(elem, null, onlyCheck) && !Nette.formErrors.length) {
238
230
+ if (!Nette.validateControl(elem, null, onlyCheck)) {
231
+ if (!Nette.formErrors.length) {
232
+ return false;
233
+ }
+
+ } else if (elem.type === 'number' && !elem.validity.valid) {
+ if (!onlyCheck) {
+ Nette.addError(elem, 'Please enter a valid value.');
239
240
241
var success = !Nette.formErrors.length;
0 commit comments