2d1006f4 by chentao

no message

1 parent 3e7af24d
......@@ -15,7 +15,7 @@ import java.lang.annotation.Target;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface AtLeastOneNonNull {
String message() default "2D和3D不能都为空";
String message() default "2D/3D不能为空";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
String[] fields(); // 指定需要校验的字段名数组
......
......@@ -44,7 +44,7 @@ public class AtLeastOneNonNullValidator implements ConstraintValidator<AtLeastOn
return false;
}
}
else if(object.getType().equals("2D,3D") || object.getType().equals("3D,2D")){
else if(object.getType().equals("2D、3D") || object.getType().equals("3D、2D")){
if(StringUtils.isBlank(object.getTwoDimensionalType()) || StringUtils.isBlank(object.getThreeDimensionalType())){
return false;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!