-
Notifications
You must be signed in to change notification settings - Fork 11
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
is it possible to make ContactPerson be invalid without email? #189
Comments
@satra @candleindark - how to express such a requirement in pydantic ? |
Change dandi-schema/dandischema/models.py Line 823 in 57b503a
to
or
General reference for this can be found at https://docs.pydantic.dev/latest/concepts/models/#required-fields. Just be aware this change will entails a change in the schema, making the field required in the schema as well, so you may need to issue a new patch version |
no -- it should be only if
|
@yarikoptic I have submitted a draft PR to provide a model level validator to ensure that a contributor acting as a contact person has an email provided. Let me know if the PR is heading to the direction of solving the problem. If it is, I will finalize the PR by adjusting the tests, etc. |
closed by next time @candleindark please use |
We have https://github.com/dandisets/000108/blob/draft/dandiset.yaml where contact person is Lee , but he is listed without email.
PS I now made @slaytonmarx to be the contact person since AFAIK Lee is no longer with the project. Please adjust if that is not true
The text was updated successfully, but these errors were encountered: