Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maskable Input : allow regex #856

Open
ZARk-be opened this issue Jan 23, 2024 · 0 comments
Open

Maskable Input : allow regex #856

ZARk-be opened this issue Jan 23, 2024 · 0 comments
Assignees

Comments

@ZARk-be
Copy link

ZARk-be commented Jan 23, 2024

Is your feature request related to a problem? Please describe.
Creating a custom Maskable input by extending BaseMaskable is really cool.
But it would be great if we could define our own regex instead of using the InputMask

Describe the solution you'd like
We could have a getInputRegex() method that will return directly the regex string, bypassing the mask.

Describe alternatives you've considered
Well i'll just run realtime validation with ->validateOnly() in my livewire

Additional context
I needed a form input to input an ipv4, the input mask ###.###.###.### is wrong because it forces you to pad with 0, which isn't very nice to look at.
Also it means you could offload the mask generation to php and have your TS component just apply the given regex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants