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 Schema on App level #94

Open
danielAsaboro opened this issue Apr 14, 2024 · 0 comments
Open

Validate Schema on App level #94

danielAsaboro opened this issue Apr 14, 2024 · 0 comments
Assignees

Comments

@danielAsaboro
Copy link

Is your feature request related to a problem? Please describe.
I came from the Nodejs world, and I remember with the Mongoosejs library
for MongoDB that we could validate our schema on the app level
e.g ensuring that only one user is associated with one email

Describe the solution you'd like
I don't know if this can be done through a struct tag in the Model

Describe alternatives you've considered
I tried using a bson:"unique" on the email, it failed

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