Commit ea6927f7 authored by wzy's avatar wzy

fix: 发票-账号等字段校验修改

parent e60dc389
......@@ -15,6 +15,7 @@ export const PATTERN_MAPS = {
phone: /^1[3|4|5|6|7|8|9][0-9]{9}$/,
phoneAndEmail: /^(1[3|4|5|6|7|8|9][0-9]{9})|([\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+)$/,
tel: /^((0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/,//座机
tel_: /^[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、\d]*$/,//座机
smsCode: /^\d{6}$/,
money:/^\d*(?:\.\d{0,2})?$/,
weight:/^\d*(?:\.\d{0,3})?$/,
......
......@@ -475,7 +475,7 @@ export default {
'balance.settleRules.receipt.info.schema.account.message': '请填写正确的银行账号',
'balance.settleRules.receipt.info.schema.address': '地址',
'balance.settleRules.receipt.info.schema.tel': '电话号码',
'balance.settleRules.receipt.info.schema.tel.message': '请填写正确的电话号码,格式为:020-12345678',
'balance.settleRules.receipt.info.schema.tel.message': '限数字和特殊字符',
'balance.settleRules.receipt.info.schema.isDefault': '是否默认',
'balance.settleRules.receipt.info.submit': '提交',
'balance.settleRules.receipt.info.button': '取消',
......
......@@ -100,7 +100,8 @@ const schema = {
title: getIntl().formatMessage({ id: 'balance.settleRules.receipt.info.schema.account' }),
'x-rules': [
{ required: true, message: '请填写账号'},
{ pattern: /^([1-9]{1})(\d{14}|\d{18})$/, message: getIntl().formatMessage({ id: 'balance.settleRules.receipt.info.schema.account.message' }) }
{ pattern: /^\d+$/, message: getIntl().formatMessage({ id: 'balance.settleRules.receipt.info.schema.account.message' }) }
// { pattern: /^([1-9]{1})(\d{14}|\d{18})$/, message: getIntl().formatMessage({ id: 'balance.settleRules.receipt.info.schema.account.message' }) }
]
},
address: {
......
......@@ -93,14 +93,14 @@ const addressSchema: ISchema = {
"x-rules": [
{
limitByte: true,
maxByte: 40
maxByte: 200
}
]
},
account: {
type: 'string',
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.invoiceSchema.account'}),
maxLength: 20
// maxLength: 20
},
address: {
type: 'string',
......@@ -117,7 +117,7 @@ const addressSchema: ISchema = {
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.invoiceSchema.tel'}),
"x-rules": [
{
pattern: PATTERN_MAPS.tel,
pattern: PATTERN_MAPS.tel_,
message: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.invoiceSchema.telMessage'}),
}
]
......
......@@ -96,14 +96,14 @@ const addressSchema: ISchema = {
},
{
limitByte: true,
maxByte: 40
maxByte: 200
}
]
},
account: {
type: 'string',
title: getIntl().formatMessage({ id: 'purchaseOrder.orderCollect.invoiceSchema.account' }),
maxLength: 20,
// maxLength: 20,
"x-rules": [
{
required: true,
......@@ -111,10 +111,10 @@ const addressSchema: ISchema = {
${getIntl().formatMessage({ id: 'common.form.input.placeholder' })}${getIntl().formatMessage({ id: 'purchaseOrder.orderCollect.invoiceSchema.account' })}
`
},
{
limitByte: true,
maxByte: 80
}
// {
// limitByte: true,
// maxByte: 80
// }
]
},
address: {
......@@ -138,7 +138,7 @@ const addressSchema: ISchema = {
title: getIntl().formatMessage({ id: 'purchaseOrder.orderCollect.invoiceSchema.tel' }),
"x-rules": [
{
pattern: /^0\d{2,3}-?\d{7,8}$/,
pattern: PATTERN_MAPS.tel_,
message: getIntl().formatMessage({ id: 'purchaseOrder.orderCollect.invoiceSchema.telMessage' }),
}
]
......
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