ZMObject
└─ZMRule
└─ZMEmailRule
public class ZMEmailRule
extends ZMRule
| Constructor Summary | |
|---|---|
ZMEmailRule(string name, string msg) Create new email rule. |
|
| Method Summary | |
|---|---|
| protected string | Build email regexp. |
| 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 ZMEmailRule(string name, string msg)
Create new email rule.
null.null.protected string emailRegexp()
Build email regexp. see: http://php.inspire.net.nz/manual/en/function.eregi.php
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.
Email validation rules.