代码bug修改
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.njcn.web.config;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
@@ -21,7 +22,7 @@ public class DateTimeValidator implements ConstraintValidator<DateTimeStrValid,
|
||||
|
||||
@Override
|
||||
public boolean isValid(String value, ConstraintValidatorContext context) {
|
||||
if (value == null) {
|
||||
if (StrUtil.isBlank(value)) {
|
||||
return true;
|
||||
}
|
||||
String format = dateTime.format();
|
||||
|
||||
Reference in New Issue
Block a user