mirror of
https://github.com/langgenius/dify.git
synced 2025-11-24 17:05:14 +00:00
6 lines
251 B
Python
6 lines
251 B
Python
|
|
def validate_description_length(description: str | None) -> str | None:
|
||
|
|
"""Validate description length."""
|
||
|
|
if description and len(description) > 400:
|
||
|
|
raise ValueError("Description cannot exceed 400 characters.")
|
||
|
|
return description
|