Skip to content

Commit

Permalink
netteForms.js: added argument 'onlyCheck' to validateForm() [Closes #133
Browse files Browse the repository at this point in the history
]
  • Loading branch information
michalhlavka authored and dg committed Aug 15, 2016
1 parent 3151b0e commit 61f0213
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assets/netteForms.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Nette.validateControl = function(elem, rules, onlyCheck, value, emptyOptional) {
/**
* Validates whole form.
*/
Nette.validateForm = function(sender) {
Nette.validateForm = function(sender, onlyCheck) {
var form = sender.form || sender,
scope = false;

Expand Down Expand Up @@ -239,7 +239,7 @@ Nette.validateForm = function(sender) {
continue;
}

if (!Nette.validateControl(elem) && !Nette.formErrors.length) {
if (!Nette.validateControl(elem, null, onlyCheck) && !Nette.formErrors.length) {
return false;
}
}
Expand Down

0 comments on commit 61f0213

Please sign in to comment.