Spaces:
Build error
Build error
File size: 288 Bytes
ecb69bb | 1 2 3 4 5 6 7 8 | def validate_input_text(text: str, max_length: int = 5000):
if not text or not text.strip():
raise ValueError("Input text cannot be empty.")
if len(text) > max_length:
raise ValueError(f"Input text exceeds max length of {max_length} characters.")
return True |