Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
uniplat-example
/
intent-example
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
228b038b
authored
Mar 27, 2023
by
罗建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat:updator支持更新校验规则
parent
ae370452
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
models/Example1.groovy
models/Example1.groovy
View file @
228b038b
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment