Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Nov 8, 2023
1 parent d5c037f commit 5835aa6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/component/GrammerHelpSider/component/SnippetForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import React, { PureComponent } from 'react';

import MonacoEditor, { IEditor } from '@/component/MonacoEditor';

const MAX_SNIPPRT_SIZE = 100000;

const { Option } = Select;
const { TextArea } = Input;
interface IProps {
Expand Down Expand Up @@ -295,12 +297,8 @@ class SnippetFormDrawer extends PureComponent<IProps> {
// 请输入语法
},
{
max: 2000,
message: formatMessage({
id: 'odc.component.SnippetForm.TheSyntaxCannotExceedCharacters',
}),

// 语法长度不能超过 2000 个字符
max: MAX_SNIPPRT_SIZE,
message: `语法长度不能超过 ${MAX_SNIPPRT_SIZE} 个字符`,
},
]}
>
Expand Down

0 comments on commit 5835aa6

Please sign in to comment.