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

Regexp support #23

Open
kiote opened this issue Feb 4, 2016 · 1 comment
Open

Regexp support #23

kiote opened this issue Feb 4, 2016 · 1 comment

Comments

@kiote
Copy link

kiote commented Feb 4, 2016

Hi @amatsuda and thanks for great gem!

I want to know do you have any plans to support Regexp in a future? Seems like this library really helps to avoid duplication between client and server, but with regexp I have to copy them anyway.

Or, maybe you have any advice for that?

I have for example, validation in backend with

value =~ /\A(4|9)\d{7}\Z/

and for frontend:

<%= f.telephone_field(:phone,
         placeholder: 'Mobile',
         pattern: '^[49]\d{7}$') %>
@Ana06
Copy link

Ana06 commented Apr 24, 2019

that's a nice idea! 💡 any reason why this haven't been implemented? 🤔 can I send a PR?

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

No branches or pull requests

2 participants