mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
正则表达式文档增加提示
This commit is contained in:
parent
84393de36c
commit
c45b669ba4
@ -1252,7 +1252,7 @@ amis 会有默认的报错信息,如果你想自定义校验信息,配置`va
|
||||
### 支持的格式校验
|
||||
|
||||
| 规则名称 | 说明 | 定义 | 版本 |
|
||||
| ------------------------ | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `isEmail` | 必须是 Email。 | `(value: any) => boolean` | |
|
||||
| `isUrl` | 必须是 Url。 | `(value: any) => boolean` | |
|
||||
| `isNumeric` | 必须是 数值。 | `(value: any) => boolean` | |
|
||||
@ -1273,11 +1273,7 @@ amis 会有默认的报错信息,如果你想自定义校验信息,配置`va
|
||||
| `isTelNumber` | 是否为合法的电话号码 | `(value: any) => boolean` | |
|
||||
| `isZipcode` | 是否为邮编号码 | `(value: any) => boolean` | |
|
||||
| `isId` | 是否为身份证号码,没做校验 | `(value: any) => boolean` | |
|
||||
| `matchRegexp:/foo/` | 必须命中某个正则。 | `(value: any, regexp: string \| RegExp) => boolean` | |
|
||||
| `matchRegexp1:/foo/` | 必须命中某个正则。 | `(value: any, regexp: string \| RegExp) => boolean` | |
|
||||
| `matchRegexp2:/foo/` | 必须命中某个正则。 | `(value: any, regexp: string \| RegExp) => boolean` | |
|
||||
| `matchRegexp3:/foo/` | 必须命中某个正则。 | `(value: any, regexp: string \| RegExp) => boolean` | |
|
||||
| `matchRegexp4:/foo/` | 必须命中某个正则。 | `(value: any, regexp: string \| RegExp) => boolean` | |
|
||||
| `matchRegexp${n}:/foo/` | 必须命中某个正则。 设置正则表达式时属性名需以 `matchRegexp` 开头,`n`支持`1-9`,且 `validations` 及 `validationsErrors` 中属性名需匹配。 | `(value: any, regexp: string \| RegExp) => boolean` | |
|
||||
| `isDateTimeSame` | 日期和目标日期相同,支持指定粒度,默认到毫秒 `millisecond` | `(value: any, targetDate: any, granularity?: string) => boolean` | `2.2.0` |
|
||||
| `isDateTimeBefore` | 日期早于目标日期,支持指定粒度,默认到毫秒 `millisecond` | `(value: any, targetDate: any, granularity?: string) => boolean` | `2.2.0` |
|
||||
| `isDateTimeAfter` | 日期晚于目标日期,支持指定粒度,默认到毫秒 `millisecond` | `(value: any, targetDate: any, granularity?: string) => boolean` | `2.2.0` |
|
||||
|
Loading…
Reference in New Issue
Block a user