ZMObject
└─ZMRule
└─ZMFieldMatchRule
public class ZMFieldMatchRule
extends ZMRule
| Method Summary | |
|---|---|
| void | __construct(string name, string other, string msg, string defaultMsg) Create new field match rule. |
| string | Return an appropriate error message. |
| string | getOther() Get the other field name. |
| void | setOther(string other) Set the other field name. |
| 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 other, string msg, string defaultMsg)
Create new field match rule.
null.null.null.public string getErrorMsg()
Return an appropriate error message.
public string getOther()
Get the other field name.
public void setOther(string other)
Set the other field name.
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.
Field match rule.
This is mostly to match new and confirm password.