def __post_init__(self): validate_dataclass(self) validate('MenuDescription.value', self.value, min_len=1, max_len=1000, custom=pattern(r'[0-9A-Za-z ;.,_-]*'))
def __post_init__(self): validate_dataclass(self) validate('Key.value', self.value, min_len=1, max_len=10, custom=pattern(r'[0-9A-Za-z_-]*'))
def test_validate_dataclass(): @dataclass() class Foo: bar: str validate_dataclass(Foo('ok')) with pytest.raises(TypeError): validate_dataclass(Foo(1))
def __post_init__(self, create_key: Any): validate('create_key', create_key, custom=Menu.Builder.is_valid_key) validate_dataclass(self)
def __post_init__(self): validate_dataclass(self)
def __post_init__(self, ): validate_dataclass(self) validate('category', self.value, min_value=0, max_value=3)
def __post_init__(self, ): validate_dataclass(self) validate('location', self.value, max_len=50, custom=pattern(r'^[a-zA-Z0-9 ]+$'))
def __post_init__(self): validate_dataclass(self) validate('date', self.date, min_value=datetime.now())
def __post_init__(self): validate_dataclass(self) validate('key', self.key)
def __post_init__(self, ): validate_dataclass(self) validate('date', self.end_date, min_value=self.start_date)
def __post_init__(self, ): validate_dataclass(self) validate('priority', self.value, min_value=0, max_value=2)