ZMObject
└─ZMRule
└─ZMRegexpRule
public class ZMRegexpRule
extends ZMRule
| Constructor Summary | |
|---|---|
ZMRegexpRule(string name, string regexp, string msg) Create new regexp rule. |
|
| Method Summary | |
|---|---|
| string | Get the regular expression. |
| void | setRegexp(string regexp) Set the regular expression. |
| string | Create JS validation call. |
| boolean | validate(ZMRequest request, array data) Validate the given request data. |
| Methods inherited from org.zenmagick.mvc.validation.ZMRule | |
|---|---|
| getDefaultMsg, getErrorMsg, getJSName, getMsg, getName, setDefaultMsg, setMsg, setName, toJSString, validate | |
| Methods inherited from org.zenmagick.core.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public ZMRegexpRule(string name, string regexp, string msg)
Create new regexp rule.
null.null.null.public string getRegexp()
Get the regular expression.
public void setRegexp(string regexp)
Set the regular expression.
public string toJSString()
Create JS validation call.
public boolean validate(ZMRequest request, array data)
Validate the given request data.
true if the regular expression does match.
Regexp validation rules.