mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
顺手改一下文档
This commit is contained in:
parent
578bc7c037
commit
820b989809
@ -610,6 +610,39 @@ amis 会有默认的报错信息,如果你想自定义校验信息,配置`va
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
默认的校验信息如下,可以直接配置文字,也可用多语言中的 key。参考:https://github.com/baidu/amis/blob/master/src/locale/zh-CN.ts#L175-L201
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
isEmail: 'validate.isEmail',
|
||||||
|
isRequired: 'validate.isRequired',
|
||||||
|
isUrl: 'validate.isUrl',
|
||||||
|
isInt: 'validate.isInt',
|
||||||
|
isAlpha: 'validate.isAlpha',
|
||||||
|
isNumeric: 'validate.isNumeric',
|
||||||
|
isAlphanumeric: 'validate.isAlphanumeric',
|
||||||
|
isFloat: 'validate.isFloat',
|
||||||
|
isWords: 'validate.isWords',
|
||||||
|
isUrlPath: 'validate.isUrlPath',
|
||||||
|
matchRegexp: 'validate.matchRegexp',
|
||||||
|
minLength: 'validate.minLength',
|
||||||
|
maxLength: 'validate.maxLength',
|
||||||
|
maximum: 'validate.maximum',
|
||||||
|
lt: 'validate.lt',
|
||||||
|
minimum: 'validate.minimum',
|
||||||
|
gt: 'validate.gt',
|
||||||
|
isJson: 'validate.isJson',
|
||||||
|
isLength: 'validate.isLength',
|
||||||
|
notEmptyString: 'validate.notEmptyString',
|
||||||
|
equalsField: 'validate.equalsField',
|
||||||
|
equals: 'validate.equals',
|
||||||
|
isPhoneNumber: 'validate.isPhoneNumber',
|
||||||
|
isTelNumber: 'validate.isTelNumber',
|
||||||
|
isZipcode: 'validate.isZipcode',
|
||||||
|
isId: 'validate.isId'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### 表单项值发生变化即校验
|
### 表单项值发生变化即校验
|
||||||
|
|
||||||
默认校验是当进行行为操作时,对表单项进行校验,如果你想每次表单项的值发生变化的时候就校验,请配置`"validateOnChange": true`
|
默认校验是当进行行为操作时,对表单项进行校验,如果你想每次表单项的值发生变化的时候就校验,请配置`"validateOnChange": true`
|
||||||
|
Loading…
Reference in New Issue
Block a user