Annotation Interface Digits


@Target({FIELD,METHOD}) @Retention(RUNTIME) @Published public @interface Digits
数値フォーマット指定を表わすアノテーション。

BigDecimalConvertor, LongConvertor, IntegerConvertorを使用する場合は、 本アノテーションの設定が必須である。
 
整数部1桁、小数部なしの場合は次のようにsetterに設定する。

     @PropertyName("認証失敗回数")
     @Required
     @NumberRange(min = 0, max = 9)
     @Digits(integer = 1, fraction = 0)
     public void setFailedCount(Integer failedCount) {
         this.failedCount = failedCount;
     }
   
バリデーションの詳細は、各コンバータの仕様を参照。

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    整数部桁数。
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    カンマ編集可否。
    int
    小数部桁数
    変換失敗時のメッセージID。
  • Element Details

    • integer

      int integer
      整数部桁数。
    • fraction

      int fraction
      小数部桁数
      Default:
      0
    • commaSeparated

      boolean commaSeparated
      カンマ編集可否。

      デフォルトはtrue(カンマ編集可)

      Default:
      true
    • messageId

      String messageId
      変換失敗時のメッセージID。
      Default:
      ""