laravel / precognition

Anticipate the outcome of a future HTTP request.
https://laravel.com/docs/precognition
MIT License
132 stars 32 forks source link

support async validate #66

Closed MohamedWagih closed 4 months ago

MohamedWagih commented 8 months ago

Make form.validate function async just like form.submit to be able to await the validation process.

Fixes #59

mtawil commented 8 months ago

Hi @timacdonald, could you please look at this PR? it fixes https://github.com/laravel/precognition/issues/59, https://github.com/laravel/precognition/issues/56, https://github.com/laravel/precognition/issues/51 and https://github.com/laravel/precognition/issues/47.

timacdonald commented 7 months ago

Progress update: https://github.com/laravel/precognition/issues/59#issuecomment-2011186530

timacdonald commented 4 months ago

Gonna close this one in favour of the PR I've been working on. Thanks!

timacdonald commented 2 months ago

Opened for review: https://github.com/laravel/precognition/pull/69

timacdonald commented 1 month ago

Merged and tagged.

<TextInput
    v-model="form.name"
    @change="form.validate('name', {
        onSuccess: () => /* ... */,
        onValidationError: () => /* .. */,
    })"
/>