Skip to content

Regexp support #23

Description

@kiote

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}$') %>

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions