This commit is contained in:
montezdesousa
2024-02-12 12:01:19 +00:00
parent cbde4bc064
commit f2f66e7b12

View File

@@ -5,7 +5,7 @@ from typing import Any, Callable, NewType, Optional
V = NewType("V", Callable[[str, Any], Any])
def check_singles(field: str, value: Optional[str]) -> Optional[str]:
def check_single(field: str, value: Optional[str]) -> Optional[str]:
"""Check that string is a single value."""
if value and ("," in value or ";" in value):
raise ValueError(f"multiple values not allowed for field '{field}'")