mirror of
https://github.com/langgenius/dify.git
synced 2026-02-19 17:34:41 +08:00
fix: name validation for output variable
This commit is contained in:
parent
59cb447e05
commit
42e80659b6
@ -38,6 +38,8 @@ const InputField: React.FC<Props> = ({
|
||||
const name = tempPayload.output_variable_name.trim()
|
||||
if (!name)
|
||||
return false
|
||||
if (name.includes(' '))
|
||||
return false
|
||||
return /(?:[a-z_]\w{0,29}){1,10}/.test(name)
|
||||
}, [tempPayload.output_variable_name])
|
||||
const handleSave = useCallback(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user