Spaces:
Runtime error
Runtime error
from pydantic import BaseModel, validator | |
class Language(BaseModel): | |
sourceLanguage: str | |
def blank_string_in_language(cls, value, field): | |
if value == "": | |
raise ValueError('sourceLanguage cannot be empty') | |
return value | |