Skip to content

Why overwritten async validations always succeeds #58

@sabob

Description

@sabob

Hi all,

I know the project is dormant currently but perhaps someone might know why async validations that is "overwritten" by a second async call succeeds eg.

let success = await $validate() will return true if an async validation is triggered again before the original event completes.

If my explanation is a bit confusing the lines in question is here:

if (this.isValidating(field, validatingId)) {
//console.log(validatingId + ' | ' + 'processed');
return addMessages(messages);
}
return false;

specifically line 242 returns false, meaning there is no error. Isn't it safer to return true rather?

Kind regards

Bob

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions