I'm learning alpine.js and trying to capture the user input value. I have used "x-on:input" but its not calling the function
Below is the simple form input
<input type="email" class="form-control" x-on:input.debounce="validateEmail($event)" x-model="userEmail" id="email" aria-describedby="emailHelp" placeholder="Enter email">
and this is the basic method in my index.js
function validateEmail(event){
console.log(userEmail);
}
The function is not getting called.
Adding a sample stackblitz
Please Guide
Thanks Shruti Nair