/
MaxLength.java
31 lines (27 loc) · 962 Bytes
/
MaxLength.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* Copyright (c) 2013, Inmite s.r.o. (www.inmite.eu).
*
* All rights reserved. This source code can be used only for purposes specified
* by the given license contract signed by the rightful deputy of Inmite s.r.o.
* This source code can be used only by the owner of the license.
*
* Any disputes arising in respect of this agreement (license) shall be brought
* before the Municipal Court of Prague.
*/
package eu.inmite.android.lib.validations.form.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Validate for maximal length of input string.
* @author Tomas Vondracek
*/
@Target(value= ElementType.FIELD)
@Retention(value= RetentionPolicy.RUNTIME)
public @interface MaxLength {
int value();
ComparingPolicy policy() default ComparingPolicy.INCLUSIVE;
int messageId() default 0;
int order() default 1000;
}