colinaut/alpinejs-plugin-simple-validate

When using multiple forms with some same fields the validation error-msg is shown on load

kevinmu17 opened this issue · 3 comments

<form x-data x-validate @submit="$validate.submit">
    <div>
        <input type="email" name="testing" required>
        <div class="error-msg text-sm mt-2 text-red-600">
            E-mailadres is required
        </div>
    </div>
    <button type="submit">send</button>
</form>
<form x-data x-validate @submit="$validate.submit">
    <div>
        <input type="email" name="testing" required>
        <div class="error-msg text-sm mt-2 text-red-600">
            E-mailadres is required
        </div>
    </div>
    <button type="submit">send</button>
</form>
Screenshot 2023-05-13 at 14 44 59

Thanks for finding this error! Sorry for the delay but I've been bury with other work. I just fixed this issue in the new 1.7.17 release.

Hi @colinaut This problem is back :(

I'm using v 1.7.23

Ok sorted out the issue. It was searching for the error from the document level and not the form level. Fixed in 1.7.24.