ZMObject
└─ZMRule
└─ZMMaxFieldLengthRule
public class ZMMaxFieldLengthRule
extends ZMRule
| Method Summary | |
|---|---|
| void | __construct(string name, string table, string column, string msg, string defaultMsg) Create new min length rule. |
| string | Return an appropriate error message. |
| protected int | Get the field length. |
| 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 table, string column, string msg, string defaultMsg)
Create new min length rule.
public string getErrorMsg()
Return an appropriate error message.
protected int getMaxFieldLength()
Get the field length.
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.
Max field length validation rule based on the database column length.