ZMObject
└─ZMRule
└─ZMDateRule
public class ZMDateRule
extends ZMRule
| Method Summary | |
|---|---|
| void | __construct(string name, string format, string msg, string defaultMsg) Create new date rule. |
| 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 | |
|---|---|
| __construct, getDefaultMsg, getErrorMsg, getJSName, getMsg, getName, setDefaultMsg, setMsg, setName, toJSString, validate | |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public void __construct(string name, string format, string msg, string defaultMsg)
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.