You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple error messages are coming when using Async Validator.
Version of Vue-form-Generator used : 2.3.4
Issue : One custom async validator is added to the field and API is integrated on that validator but on every key press if field is invalid, error messages keeps pushing into the array and though multiple error messages are coming below field.
Expectation : On key press if error already exists in the array, it should not be pushed again.
I have been encountering a similar issue, it is yet not a blocker as duplicate error messages do not happen every time, but sometimes the same error keeps repeating.
Just to add, the API call to check the value and respond from server, happens on each key up event. This is not the case if I check the value once the form is submitted, but then that adds up to a delayed user experience.
Multiple error messages are coming when using Async Validator.
Version of Vue-form-Generator used : 2.3.4
Issue : One custom async validator is added to the field and API is integrated on that validator but on every key press if field is invalid, error messages keeps pushing into the array and though multiple error messages are coming below field.
Expectation : On key press if error already exists in the array, it should not be pushed again.
Example :
isNameExists(value) {
return await new Promise((resolve) => {
HTTP.get("/nameExits=" + value)
.then((response) => {
resolve(["Name not exists"]);
})
.catch((e) => {
resolve();
this.errors.push(e);
});
});
},
isNameExists is custom validator. Error message "Name not exists" keeps on repeating".
Note : Error keeps on repeating in slow network, for fast network it is working fine.
@icebob Please look into this.
Thanks in advance
The text was updated successfully, but these errors were encountered: