|
@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.