Is it possible to add a mask to an email?
Is it possible to add a mask to an email?
I need to force the user's hand to not be able to write values not present in an email address like '&' or 'é'...
I have a regex that works very well:
Is it possible to have a mask with RawJs in the same way? Like this :
In v2, we had the opportunity :
Thanks
3 Replies
Of course I can, and I already use it as such, but I'm not looking for a workaround when we have the mask() method and we don't use it to its full capacity. Hence my question, does the mask() method have this capability?
As its an implementation of Alpine.js’ Mask plugin (https://alpinejs.dev/plugins/mask) I guess you should ask around in their community. You can always implement something yourself, just be aware that the onKeydown solutions don’t cover copy/paste scenarios.
Mask — Alpine.js
Automatically format text fields as users type