mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-19 07:46:53 +08:00
chore: eslint add sonar (#17989)
This commit is contained in:
@@ -38,7 +38,7 @@ const ObjectValueItem: FC<Props> = ({
|
||||
const handleKeyChange = useCallback((index: number) => {
|
||||
return (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const newList = produce(list, (draft: any[]) => {
|
||||
if (!/^[a-zA-Z0-9_]+$/.test(e.target.value))
|
||||
if (!/^\w+$/.test(e.target.value))
|
||||
return notify({ type: 'error', message: 'key is can only contain letters, numbers and underscores' })
|
||||
draft[index].key = e.target.value
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user