Skip to content
Permalink
Browse files
add remark name verification (#288)
  • Loading branch information
shzcore committed Jan 14, 2021
1 parent 7a3efa0 commit 30c52dd85a20fdc4de049b7e5dfc2510847154b8
Showing 1 changed file with 4 additions and 2 deletions.
@@ -154,8 +154,10 @@ public JobManager update(@PathVariable("connId") int connId,
Constant.COMMON_NAME_PATTERN.matcher(
newEntity.getJobName()).matches(),
"job.manager.job-name.unmatch-regex");
Ex.check(newEntity.getJobRemarks().length() <= 200,
"job.manager.job-remarks.reached-limit");
Ex.check(!StringUtils.isEmpty(newEntity.getJobRemarks()), () ->
Constant.COMMON_REMARK_PATTERN.matcher(
newEntity.getJobRemarks()).matches(),
"job.manager.job-remarks.unmatch-regex");
// Check exist Job Manager with this id
JobManager entity = this.service.get(id);
if (entity == null) {

0 comments on commit 30c52dd

Please sign in to comment.