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

Add new field types (email, url) or regex validation #61

Closed
doup opened this issue Jul 27, 2016 · 1 comment
Closed

Add new field types (email, url) or regex validation #61

doup opened this issue Jul 27, 2016 · 1 comment
Labels

Comments

@doup
Copy link
Contributor

doup commented Jul 27, 2016

It would be interesting to have more options to constraint the user input, useful for email, url… fields. Maybe the most versatile option would be to add a regex validation option to the "text" field. CF could add some constants for the most commonly used regexes (CF_EMAIL_REGEX, CF_URL_REGEX…).

In the case of adding regex validation I imagine that we should provide the JS version, since there is no real server side validation of the input. (is there?)

Another issue might be the visual feedback of the errors as noted in #60.

@m1r0 m1r0 added the feature label Jul 28, 2016
@atanas-dev
Copy link
Contributor

2.0.0 has been released which includes a JS API so you can hook into form submissions and perform your own client-side validation.
More info here: https://carbonfields.net/docs/advanced-topics-javascript-api/?crb_version=2-0-0

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

No branches or pull requests

3 participants