aerni / statamic-livewire-forms

Supercharge your Statamic forms with Livewire
https://statamic.com/addons/aerni/livewire-forms
Other
28 stars 2 forks source link

Reintroduce real-time validation #45

Closed aerni closed 1 year ago

aerni commented 1 year ago

This PR partially reverts the changes made in PR #44. While Livewire's new default is to defer all network requests, it is a mostly unwanted behavior regarding form validation.

This PR reintroduces real-time validation by updating and validating a field's value on change event. This behavior can be overridden by setting wire_model to whatever desired modifier.

To use Livewire's default defer behavior, you may add wire_model: defer to a field's config.