All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ibankapp.base.validation.constraint.Identifier Maven / Gradle / Ivy

/*
 * iBankApp
 *
 * License : Apache License,Version 2.0, January 2004
 *
 * See the LICENSE file in English or LICENSE.zh_CN in chinese
 * in the root directory or .
 */

/*
 * iBankApp
 *
 * License : Apache License,Version 2.0, January 2004
 *
 * See the LICENSE file in English or LICENSE.zh_CN in chinese
 * in the root directory or .
 */

/*
 * iBankApp
 *
 * License : Apache License,Version 2.0, January 2004
 *
 * See the LICENSE file in English or LICENSE.zh_CN in chinese
 * in the root directory or .
 */

package org.ibankapp.base.validation.constraint;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;
import org.ibankapp.base.validation.validator.IdentifierValidator;

/**
 * 证件验证注解
 *
 * @author ibankapp
 * @author codelder
 * @since 1.0.0
 */
@Target({TYPE, ANNOTATION_TYPE})
@Retention(RUNTIME)
@Constraint(validatedBy = IdentifierValidator.class)
@Documented
public @interface Identifier {

  /**
   * 获取 错误信息.
   *
   * @return 错误信息
   */
  String message() default "{constraints.identifier}";

  /**
   * 分组.
   *
   * @return 分组
   */
  Class[] groups() default {};

  /**
   * payload.
   *
   * @return pyaload
   */
  Class[] payload() default {};

  /**
   * 证件类型字段.
   *
   * @return 证件类型字段名称
   */
  String typefield();

  /**
   * 证件号码字段.
   *
   * @return 证件号码字段名称
   */
  String codefield();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy