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

Question: How do you do validation for two columns that depend on each other #25

Closed
dtamez opened this issue Jun 6, 2019 · 5 comments
Closed

Comments

@dtamez
Copy link

dtamez commented Jun 6, 2019

Easy example: You have a column for phone and a column for email. One of them has to be supplied - they can't both be blank.

I can create a new column that has the other two columns combined and run a custom validator on that - but if there's a built in way I'd like to know.

@multimeric
Copy link
Owner

Currently, you can't. See #2. This is something I've been meaning to get to for a while, but of course a PR would be the fastest way to get this implemented.

@contang0
Copy link

May I add that it would be useful to be able to construct validation on arbitrary number of columns, not just two.

@Abhisek1994Roy
Copy link

Abhisek1994Roy commented Jan 10, 2021

Any update on validations with 2 or more columns?
I understand that it is not implemented inherently, but can we at least do it using custom functions?

@multimeric
Copy link
Owner

Sorting this out has ended up requiring a whole rewrite to the library. My lack of spare time, plus losing a few days of uncommitted work has unfortunately slowed this down. There is no way to do this within the confines of the library as is.

@multimeric
Copy link
Owner

I'm closing this issue because it's strongly related to #2, and any work that closes it will close this also.

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

4 participants