Hi again, I have the following code
and I want to validate each item INDIVIDUALLY when on blur, but I don't know how.
I don't want to use "validateOnChange" since I have the "changeOnKeypress: true" and I can not remove it (to solve another problem of other thread). With "changeOnKeypress: true" set while typing maybe the value doesn't fit the validation pattern since it is not yet completed and un-desired error message appears. (This is why I need it just on blur)
I don't want to use "exampleForm.validate()" since it validates the entire form and I want just validate the item which I blur
Does it exist something like "this.validate()" (this obviously doesn't work) that I can replace by the XXXX (of the above code) to validate?
Thanks!
Code:
isc.DynamicForm.create({
ID: "exampleForm",
fields: [{
.....
changeOnKeypress: true,
validators : [{
type : "custom",
condition : function (form, item, value) {
....
}
}],
blur : function () { XXXX }
},{
.....
changeOnKeypress: true,
validators : [{
type : "custom",
condition : function (form, item, value) {
....
}
}],
blur : function () { XXXX }
}]
});
I don't want to use "validateOnChange" since I have the "changeOnKeypress: true" and I can not remove it (to solve another problem of other thread). With "changeOnKeypress: true" set while typing maybe the value doesn't fit the validation pattern since it is not yet completed and un-desired error message appears. (This is why I need it just on blur)
I don't want to use "exampleForm.validate()" since it validates the entire form and I want just validate the item which I blur
Does it exist something like "this.validate()" (this obviously doesn't work) that I can replace by the XXXX (of the above code) to validate?
Thanks!
Comment