Commit 228b038b by 罗建民

feat:updator支持更新校验规则

parent ae370452
Showing with 2 additions and 8 deletions
......@@ -171,15 +171,10 @@ class Example1 {
def requireUpdator(ParameterUpdateMasterContext ctx) {
if (ctx.sender == 'isRequired') {
if (ctx.params.isRequired) {
RuleDef ruleRequired = new RuleDef()
ruleRequired.setRequired(true)
ruleRequired.setMessage(String.format("%s不能为空", "文本值"))
ruleRequired.setTrigger("change")
ctx.setRequired(ctx.params.isRequired)
return [
"rules": Arrays.asList(ruleRequired)
"rules": ctx.getRules()
]
}
}
}
}
\ No newline at end of file
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 sign in to comment