Commit 29fab658 authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加 校验

parent d6611bbd
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 18:00:52
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-03 16:49:52
* @LastEditTime: 2021-06-07 16:50:38
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -20,6 +20,7 @@ import {
MEMBER_TAX_POINT_5,
MEMBER_TAX_POINT,
} from '@/constants/member';
import { PATTERN_MAPS } from '@/constants/regExp';
export const schema: ISchema = {
type: 'object',
......@@ -45,6 +46,12 @@ export const schema: ISchema = {
title: '会员编码',
required: true,
description: '{{MemberCodeDescription}}',
'x-rules': [
{
pattern: /^[a-zA-Z0-9_-]{1,10}$/,
message: '请输入数字、英文、_-,最多支持10个字符',
},
],
},
partnerType: {
type: 'string',
......@@ -63,6 +70,12 @@ export const schema: ISchema = {
addonBefore: '¥',
},
description: '{{MemberCypher}}',
'x-rules': [
{
pattern: PATTERN_MAPS.money,
message: '请输入数值,最多支持小数点后两位',
},
],
},
areaCodes: {
type: 'array',
......@@ -164,6 +177,12 @@ export const schema: ISchema = {
type: 'string',
title: '付款周期(天)',
required: true,
'x-rules': [
{
pattern: /^([0]|[1-9][0-9]*)$/,
message: '请输入0 或 正整数',
},
],
},
invoiceTypeName: {
type: 'string',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment