Skip to content
This repository was archived by the owner on Dec 25, 2017. It is now read-only.
This repository was archived by the owner on Dec 25, 2017. It is now read-only.

Manually trigger validations #150

Closed
Closed
@Almis90

Description

@Almis90

I have custom validation

uniqueUsername: function (val) {
    return !this.usernameExists;
}

and a method

usernameKeyup: function () {
    var self = this;
    Vue.http.post('/username', { username: this.username }).then(function (res) {
        if (res.data.success) {
            self.usernameExists = res.data.object;
        }
    }).catch(function (res) {
        console.log(res);
    });
}

When the usernameExists changes the validation is not re-evaluating, only when I go to next input it shows the correct validation. Is there any way that I could manually re-evaluate for single input?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions