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

Allow specifying custom input pattern #84

Open
mstieranka opened this issue Aug 17, 2022 · 1 comment
Open

Allow specifying custom input pattern #84

mstieranka opened this issue Aug 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@mstieranka
Copy link

mstieranka commented Aug 17, 2022

Hi, in the application that we currently use this library in, we use it to input codes with the regex pattern of /^[0-9a-zA-Z]{6}$, however, this library only allows enforcing of /^[0-9]+$/, otherwise all characters are allowed.

Would it be possible, or desirable, to allow the user to set their own regexp pattern? I could work on this as a pull request if needed.

Code example as to how I imagine this could look in use:

<code-input pattern="[0-9a-zA-Z]" ...></code-input>
@AlexMiniApps
Copy link
Owner

@mstieranka Hi. I need to research it. Not sure that such pattern is required. Maybe I will add an option with function to validate Input where will be possible to evaluate the user input.

@AlexMiniApps AlexMiniApps added the enhancement New feature or request label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants