yangys
2024-05-09 014ac34ff2baf657c3236f41fdbf11c9d7d414b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.qianwen.smartman.common.validator.flag;
 
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
 
public class FlagValueValidator implements ConstraintValidator<FlagValue, String> {
    private Boolean required;
 
    public void initialize(FlagValue constraintAnnotation) {
        this.required = Boolean.valueOf(constraintAnnotation.required());
    }
 
    public boolean isValid(String flagValue, ConstraintValidatorContext context) {
        return true;
    }
}