SPT Core API

com.sptci.echo2.annotation
Annotation Type Constraints


@Documented
@Inherited
@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface Constraints

Annotation type used to list the constraints on view components. These may be used to perform automatic checking of user input on view components.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: Constraints.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2007-05-02

Optional Element Summary
 String confirm
          The name of a field used to confirm the value entered in this field.
 String regex
          The regular expression to be applied to check validity of the field.
 Constraints.Value value
          The constraint to be applied to the field.
 

value

public abstract Constraints.Value value
The constraint to be applied to the field.

Returns:
The enumerated value that represents the constraint.
Default:
NULL

regex

public abstract String regex
The regular expression to be applied to check validity of the field.

Returns:
The regular expression that may be compiled through Pattern.
Default:
""

confirm

public abstract String confirm
The name of a field used to confirm the value entered in this field. Used typically to confirm the value of password, e-mail address etc. For example if this annotation is for a field named password1 and the additional field in which the confirmation is entered is named password2 this value would be set to password2.

Returns:
The name of the confirmation field.
Default:
""

SPT Core API