sparkles: ✨ 校验
This commit is contained in:
parent
0a39446c65
commit
05ac02f58a
@ -40,7 +40,16 @@ export const formItems = (sexes: Codebook[]): FormItem[] => {
|
||||
placeholder: t('pages.acl.user.form.add.placeholder.name'),
|
||||
maxlength: 20,
|
||||
},
|
||||
rules: [],
|
||||
rules: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
whitespace: true,
|
||||
trigger: ['blur', 'change'],
|
||||
pattern: new RegExp('^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$'),
|
||||
message: '8位数字字母组合',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'radio',
|
||||
@ -80,7 +89,16 @@ export const formItems = (sexes: Codebook[]): FormItem[] => {
|
||||
showCount: true,
|
||||
placeholder: t('pages.acl.user.form.add.placeholder.password'),
|
||||
},
|
||||
rules: [],
|
||||
rules: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
whitespace: true,
|
||||
trigger: ['blur', 'change'],
|
||||
pattern: new RegExp('^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$'),
|
||||
message: '8位数字字母组合',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
group: 'form',
|
||||
|
Loading…
x
Reference in New Issue
Block a user