ZMObject
└─ZMRule
└─ZMListRule
public class ZMListRule
extends ZMRule
| Constructor Summary | |
|---|---|
ZMListRule(string name, mixed values, string msg) Create new list rule. |
|
| Method Summary | |
|---|---|
| mixed | Get values. |
| void | setValues(mixed values) Set values. |
| 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 ZMListRule(string name, mixed values, string msg)
Create new list rule.
null.null.null.public mixed getValues()
Get values.
public void setValues(mixed values)
Set values.
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.
List validation rules.
Validate against a list of allowed values.