com.kbmj.svt
Class Rules

java.lang.Object
  |
  +--com.kbmj.svt.Rules

public class Rules
extends java.lang.Object

Utility class for providing basic rules. Caching of Rules might be implemented in future releases.

Author:
shinya

Constructor Summary
Rules()
           
 
Method Summary
static Rule array(Rule rule)
           
static Rule chain(Rule[] rules)
           
static Rule chainArray(Rule rule)
           
static Rule lengthRange(int min, int max)
           
static Rule mailAddress()
           
static Rule maxLength(int len)
           
static Rule minLength(int len)
           
static Rule multi(Rule[] rules)
           
static Rule naturalNumber()
           
static Rule nest(java.lang.String property, Rule rule)
           
static Rule nop()
           
static Rule number()
           
static Rule perlRegex(java.lang.String pattern)
           
static Rule perlRegex(java.lang.String pattern, java.lang.String key)
           
static Rule regex(java.lang.String pattern)
           
static Rule regex(java.lang.String pattern, java.lang.String key)
           
static Rule required()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rules

public Rules()
Method Detail

required

public static Rule required()

maxLength

public static Rule maxLength(int len)

minLength

public static Rule minLength(int len)

lengthRange

public static Rule lengthRange(int min,
                               int max)

number

public static Rule number()

naturalNumber

public static Rule naturalNumber()

nop

public static Rule nop()

chainArray

public static Rule chainArray(Rule rule)

array

public static Rule array(Rule rule)

multi

public static Rule multi(Rule[] rules)

chain

public static Rule chain(Rule[] rules)

regex

public static Rule regex(java.lang.String pattern,
                         java.lang.String key)

regex

public static Rule regex(java.lang.String pattern)

perlRegex

public static Rule perlRegex(java.lang.String pattern,
                             java.lang.String key)

perlRegex

public static Rule perlRegex(java.lang.String pattern)

nest

public static Rule nest(java.lang.String property,
                        Rule rule)

mailAddress

public static Rule mailAddress()