ZMObject
└─ZMRule
└─ZMDateRule
public class ZMDateRule
extends ZMRule
| Constructor Summary | |
|---|---|
ZMDateRule(string name, string format, string msg) Create new date rule. |
|
| Method Summary | |
|---|---|
| string | Return an appropriate error message. |
| protected void | Get the format string. |
| 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 ZMDateRule(string name, string format, string msg)
Create new date rule.
null, UI_DATE_FORMAT will be used.public string getErrorMsg()
Return an appropriate error message.
protected void getFormat()
Get the format string.
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.
Date validation rule.