Skip to content

Validate Schema on App level #94

Open
@danielAsaboro

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions