Annotation Interface Validate


@Documented @Target(FIELD) @Retention(RUNTIME) public @interface Validate
  • 元素详细资料

    • notEmpty

      boolean notEmpty
      是否为空
      返回:
      boolean
      默认值:
      false
    • minLength

      int minLength
      最少长度
      返回:
      int
      默认值:
      0
    • maxLength

      int maxLength
      最大长度
      返回:
      int
      默认值:
      0
    • regexType

      ERegexTypeEnums regexType
      提供几种常用的正则验证
      返回:
      ERegexTypeEnums
      默认值:
      NONE
    • regexExpression

      String regexExpression
      自定义正则验证
      返回:
      String
      默认值:
      ""
    • description

      String description
      参数或者字段描述,这样能够显示友好的异常信息
      返回:
      String
      默认值:
      ""
    • dateFormat

      String dateFormat
      时间格式化
      返回:
      String
      默认值:
      "yyyy-MM-dd HH:mm:ss"