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

Validate region #12

Open
timkelty opened this issue Aug 18, 2016 · 2 comments
Open

Validate region #12

timkelty opened this issue Aug 18, 2016 · 2 comments

Comments

@timkelty
Copy link
Contributor

I'm using an address field but need my regions to all be consistent.
This is tough since there's no validation on the field.

Ideally it would be a dropdown of US state, Canadian Provinces, etc. based on the country - but that obviously get tough to scale to other countries.

Maybe an easy alternative would be a fieldtype option where you could optionally define a regex pattern for each sub-field (postal code, region, etc) to validate against. Then at least you could enforce, e.g. ISO 3166-2

@elivz
Copy link
Owner

elivz commented Oct 30, 2016

Hey Tim, I am very sorry I missed this when you first posted it. I was traveling at the time, and must have mis-filed the notification email. At the moment, I think the additional UI complexity of field-by-field regex validation is probably going to be such that I won't add it right now. I will definitely think on this though, and see if I can come up with some elegant solution to the validation problem. Dealing with international addresses is quite a pain, as it turns out!

@timkelty
Copy link
Contributor Author

Sounds good, thanks for the update.

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