-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Validation of enum values #23
Comments
@simonvadee thank you so much for raising this issue and sorry for any inconvenience.
Why not ENUM validation included:
But we have that flexibility kept to make custom validation, moreover, it will be possible extend enum values! Example:
Here you will find, about better way to add custom validator #17 (comment) |
Thank you for the example, now I understand why (and how) enum validation is not enforced by default! |
Description
I want
FHIRAbstractModel
to be able to validate enum values. I think it's already supported by the current version but I couldn't find how to do it.I don't quite understand what this means:
note: Enum values can be used in validation, but use in your own responsibilities, read official FHIR documentation.
because the pydantic model does not enforce the value of this field.
What I Did
The text was updated successfully, but these errors were encountered: