Commit 25ee2187 authored by XieZhiXiong's avatar XieZhiXiong

添加中文字数限制

parent 889bdd0a
......@@ -126,7 +126,16 @@ export const auditModalSchema: ISchema = {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
maxLength: 60,
},
'x-rules': [{ required: true, message: '请填写审核不通过原因' }],
'x-rules': [
{
required: true,
message: '请填写审核不通过原因',
},
{
limitByte: true, // 自定义校验规则
maxByte: 200,
}
],
},
},
},
......
......@@ -138,9 +138,17 @@ export const auditModalSchema = props => {
'x-component': 'TextArea',
'x-component-props': {
placeholder: '在此输入你的内容,最长120个字符,60个汉字',
maxLength: 60,
},
'x-rules': [{ required: true, message: '请填写审核不通过原因' }],
'x-rules': [
{
required: true,
message: '请填写审核不通过原因'
},
{
limitByte: true, // 自定义校验规则
maxByte: 120
}
],
},
},
},
......@@ -353,6 +361,12 @@ export const initDetailSchema = (props: any) => {
rows: 4,
placeholder: '最大200个字符,100个汉字',
},
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 200,
}
],
},
},
},
......
......@@ -134,7 +134,16 @@ export const auditModalSchema: ISchema = {
maxLength: 60,
rows: 5,
},
'x-rules': [{ required: true, message: '请填写原因' }],
'x-rules': [
{
required: true,
message: '请填写原因',
},
{
limitByte: true, // 自定义校验规则
maxByte: 120,
}
],
},
},
},
......
......@@ -140,10 +140,10 @@ export const auditModalSchema: ISchema = {
rows: 5,
},
'x-rules': [
// {
// required: true,
// message: '请填写审核不通过原因',
// }
{
limitByte: true, // 自定义校验规则
maxByte: 120,
}
],
},
},
......
......@@ -140,10 +140,10 @@ export const auditModalSchema: ISchema = {
rows: 5,
},
'x-rules': [
// {
// required: true,
// message: '请填写审核不通过原因',
// }
{
limitByte: true, // 自定义校验规则
maxByte: 120,
}
],
},
},
......
......@@ -140,10 +140,10 @@ export const auditModalSchema: ISchema = {
rows: 5,
},
'x-rules': [
// {
// required: true,
// message: '请填写审核不通过原因',
// }
{
limitByte: true, // 自定义校验规则
maxByte: 120,
}
],
},
},
......
......@@ -179,6 +179,16 @@ export const channelSchema: ISchema = {
rows: 5,
placeholder: '最大200个字符,100个汉字',
},
'x-rules': [
{
required: true,
message: '请填写渠道描述'
},
{
limitByte: true, // 自定义校验规则
maxByte: 200,
}
],
},
},
},
......
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