mirror of https://github.com/langgenius/dify.git
fix(input-field): update regex for name validation to ensure correct format
This commit is contained in:
parent
9341227cf1
commit
5f73fed1e7
|
|
@ -39,7 +39,7 @@ const InputField: React.FC<InputFieldProps> = ({
|
|||
return false
|
||||
if (name.includes(' '))
|
||||
return false
|
||||
return /(?:[a-z_]\w{0,29}){1,10}/.test(name)
|
||||
return /^(?:[a-z_]\w{0,29}){1,10}$/.test(name)
|
||||
}, [tempPayload.output_variable_name])
|
||||
const handleSave = useCallback(() => {
|
||||
if (!nameValid)
|
||||
|
|
|
|||
Loading…
Reference in New Issue