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

Model can't be used since datapoint_uri validation doesn't return a value #51

Open
Villux opened this issue May 5, 2021 · 0 comments
Open
Milestone

Comments

@Villux
Copy link
Contributor

Villux commented May 5, 2021

@validator("datapoint_uri", always=True)
def validate_datapoint_uri(cls, value):
if len(value) < 10:
raise ValidationError("datapoint_uri need to be at least 10 char length.")

I think pydantic validator should return the value at the end of the function? Now the model can be used only for validation.

@Villux Villux added this to the HMT-NEXT milestone May 5, 2021
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

1 participant