@Documented @Target(value={TYPE,METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Constraint(validatedBy=CustomValidator.class) public @interface CustomValidated
尽量使用已存在的校验注解:
AssertFalseAssertTrueDecimalMaxDecimalMinDigitsEmailFutureFutureOrPresentMaxMinNegativeNegativeOrZeroNotBlankNotEmptyNotNullNullPastPastOrPresentPatternPositivePositiveOrZeroSizeDecimalScaleGreaterThanLengthEqualsLengthMaxLengthMinLengthRangeLessThanNotNoneNumericRegexppublic abstract Class<? extends CustomValidation> value
public abstract String message
public abstract String[] arguments
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
Copyright © 2025 fossc. All rights reserved.