@Documented @Target(value={TYPE,FIELD,PARAMETER}) @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 © 2024 fossc. All rights reserved.