Closed 64knl closed 11 months ago
Hrm yeah I haven't tried it with CSP. You're request was simple so I added it. Sorry for the delay in responding, but the past couple months have been really busy.
With the new 1.7.22 you can add x-validate.validate-on-submit
to the form element to trigger it. Hope this works for you.
I'm trying to run this script under a strict Content Security Policy and cannot get
@submit="$validate.submit"
to work. Not sure if it's me doing something wrong, or CSP version of Alpine just doesn't allow it.It would be nice if there was an option to automatically trigger validation from within the plugin. This could be triggered by a CSP safe option such as an extra attribute on the
<form>
tag.Somewhat working sample:
To reproduce: