ZMObject
|
+--ZMRule
|
+--ZMMaxFieldLengthRule
public class ZMMaxFieldLengthRule
extends ZMRule
| Constructor Summary | |
|---|---|
ZMMaxFieldLengthRule(string name, string table, string column, string msg) Create new min length rule. |
|
| Method Summary | |
|---|---|
| string | Return an appropriate error message. |
| protected int | Get the field length. |
| 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 ZMMaxFieldLengthRule(string name, string table, string column, string msg)
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(array req)
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.