mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 15:08:06 +08:00
Length limit for UserAction fields (vibe-kanban e9ec1f07)
Add the following length limit to UserAction fields: - limit the length of `id` to 20 chars. - limit the length of title to 40 chars. Add some unit tests to ensure the validation rules are enforced.
This commit is contained in:
@ -166,8 +166,8 @@ class UserAction(BaseModel):
|
||||
# It also serves as the identifiers of output handle.
|
||||
#
|
||||
# The id must be a valid identifier (satisfy the _IDENTIFIER_PATTERN above.)
|
||||
id: str
|
||||
title: str
|
||||
id: str = Field(max_length=20)
|
||||
title: str = Field(max_length=20)
|
||||
button_style: ButtonStyle = ButtonStyle.DEFAULT
|
||||
|
||||
@field_validator("id")
|
||||
|
||||
Reference in New Issue
Block a user