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 database validation rules exists_in_db and unique_in_db #596

Merged
merged 2 commits into from
Apr 28, 2022

Conversation

girardinsamuel
Copy link
Contributor

@girardinsamuel girardinsamuel commented Apr 19, 2022

Usage

validate.exists_in_db("email", "users")
validate.exists_in_db("name", "users", "first_name")
validate.exists_in_db("email", "app.models.User")
validate.exists_in_db("email", "app.models.User", connection="sqlite")
validate.unique_in_db("email", "users")
validate.unique_in_db("my_unique_email", "app.User", "email")
validate.unique_in_db("email", "app.models.User")

Fix #586

@girardinsamuel girardinsamuel added the Next Minor Non-breaking change that can go into the next minor version label Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next Minor Non-breaking change that can go into the next minor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add bail validation rule
2 participants