fieldValidateConfig:
[
{field:'f1',validates:[]},
]validates : 结构
like模糊匹配(作废太麻烦有正则就够了):
{
not: false,//取反
type:'like', // like,regex,conditions
like : "xx%",// 多个可用,分隔 "%"表示0或任意数量字符; "_"表示一个字符
errorMessage:'校验失败提示消息'
}//正则匹配
{
not: false,//取反
type:'like', // like,regex,conditions
type:'regex',
"regex":"^(?!st_).*",
flags:['CASE_INSENSITIVE'],//不区分大小写匹配
errorMessage:'校验失败提示消息'
//数据符合条件才进行校验
conditions : [
{logic:"and|or",field:"xxx","operation":"=","value":"xxx"}
],
}旧版:
[
{
"type":"like",
"title":"字母",
"like":["xx%"],
"notLike":["abc_"],
"conditions":[
{logic:"and|or",field:"xxx","operation":"=","value":"xxx"}
]
},
{
"type":"regex",
"title":"字母",
"regex":"^(?!st_).*",
"flags":"CASE_INSENSITIVE",
"errorMessage":"不能st_开头",
"conditions":[
{logic:"and|or",field:"xxx","operation":"=","value":"xxx"}
]
}
]文档更新时间: 2026-02-04 16:44 作者:admin