ProjectLensAI / utils /validators.py
prashant
Initial commit
ecb69bb
Raw History Blame Contribute Delete
288 Bytes
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