Fix(Input): Fixed the problem of not validating whitespace characters

Fixed the problem of not validating whitespace characters
This commit is contained in:
2024-04-22 00:27:27 +08:00
parent 90351ec972
commit b471d55e7a
6 changed files with 9 additions and 9 deletions

View File

@@ -806,7 +806,7 @@ const User = () => {
<AntdForm.Item
name={'username'}
label={'用户名'}
rules={[{ required: true, whitespace: false }]}
rules={[{ required: true, whitespace: true }]}
>
<AntdInput allowClear />
</AntdForm.Item>
@@ -815,7 +815,7 @@ const User = () => {
<AntdForm.Item
name={'password'}
label={'密码'}
rules={[{ required: true, whitespace: false }]}
rules={[{ required: true, whitespace: true }]}
>
<AntdInput.Password allowClear />
</AntdForm.Item>
@@ -824,14 +824,14 @@ const User = () => {
<AntdForm.Item
name={'nickname'}
label={'昵称'}
rules={[{ required: true, whitespace: false }]}
rules={[{ required: true, whitespace: true }]}
>
<AntdInput allowClear />
</AntdForm.Item>
<AntdForm.Item
name={'email'}
label={'邮箱'}
rules={[{ required: true, whitespace: false, type: 'email' }]}
rules={[{ required: true, whitespace: true, type: 'email' }]}
>
<AntdInput type={'email'} allowClear />
</AntdForm.Item>