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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Rules
public Rules()
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()