|
@@ -2,7 +2,7 @@ from enum import Enum
|
|
|
from typing import Union
|
|
|
|
|
|
from fastapi_camelcase import CamelModel
|
|
|
-from pydantic import conint, confloat
|
|
|
+from pydantic import conint, confloat, constr
|
|
|
|
|
|
|
|
|
class GenMethodEnum(str, Enum):
|
|
@@ -21,7 +21,7 @@ class RuleSetEnum(str, Enum):
|
|
|
class GameConfig(CamelModel):
|
|
|
timer: conint(gt=0)
|
|
|
rounds: conint(gt=0)
|
|
|
- country_lock: Union[str, None] = None
|
|
|
+ country_lock: Union[constr(to_lower=True, min_length=2, max_length=2), None] = None
|
|
|
generation_method: GenMethodEnum = GenMethodEnum.rsv
|
|
|
rule_set: RuleSetEnum = RuleSetEnum.normal
|
|
|
|