ZMObject
|
+--ZMRule
|
+--ZMRequiredRule
public class ZMRequiredRule
extends ZMRule
| Constructor Summary | |
|---|---|
ZMRequiredRule(mixed name, string msg) Create new required rule. |
|
| Method Summary | |
|---|---|
| string | Create JS validation call. |
| boolean | validate(array req) Validate the given request data. |
| Methods inherited from org.zenmagick.validation.ZMRule | |
|---|---|
| getDefaultMsg, getErrorMsg, getJSName, getMsg, getName, toJSString, validate | |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public ZMRequiredRule(mixed name, string msg)
Create new required rule.
If a list of names is specified, validation is considered teh existence of at least one.
public string toJSString()
Create JS validation call.
public boolean validate(array req)
Validate the given request data.
true if the value for $name is valid, false if not.
Required validation rules.