ZMObject
└─ZMRule
└─ZMStateOrZoneIdRule
public class ZMStateOrZoneIdRule
extends ZMRule
| Constructor Summary | |
|---|---|
ZMStateOrZoneIdRule(string name, string msg) Create new required rule. |
|
| Method Summary | |
|---|---|
| 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 ZMStateOrZoneIdRule(string name, string msg)
Create new required rule.
public string toJSString()
Create JS validation call.
public boolean validate(ZMRequest request, array data)
Validate the given request data.
true if the value for $name is valid, false if not.
Check for either state or zone.
This rule will attempt to make changes to the underlying form bean in order to adjust state/zoneId if required.