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

Support enum with custom error message #45

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

romy-piche
Copy link
Contributor

Support custom error object syntax for enum type

example:

Object syntax: enum: { values: ['Coffee', 'Tea'], message: '{VALUE} is not supported' }

https://mongoosejs.com/docs/validation.html#custom-error-messages

@coveralls
Copy link

Coverage Status

coverage: 98.534% (+0.009%) from 98.525% when pulling cf3abac on romy-piche:master into 31258ae on DScheglov:master.

@DScheglov DScheglov merged commit fadcfd9 into DScheglov:master Sep 29, 2023
21 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants