fix a bug in Ox.Form, regarding error messages on submit
This commit is contained in:
parent
6eef7c567b
commit
329b82845e
1 changed files with 1 additions and 2 deletions
|
@ -86,12 +86,11 @@ Ox.Form = function(options, self) {
|
|||
|
||||
function submitCallback(data) {
|
||||
data.forEach(function(v, i) {
|
||||
self.$items[i].setMessage(v.message);
|
||||
self.$items[getItemIndexById(v.id)].setMessage(v.message);
|
||||
});
|
||||
}
|
||||
|
||||
function validate(pos, valid) {
|
||||
//Ox.print('FORM validate', pos, valid)
|
||||
self.itemIsValid[pos] = valid;
|
||||
if (Ox.every(self.itemIsValid) != self.formIsValid) {
|
||||
self.formIsValid = !self.formIsValid;
|
||||
|
|
Loading…
Reference in a new issue