ZenMagick 0.9.10


zenmagick.store.shared.mvc.validation\ZMUniqueEmailRule
mvc\validation\ZMUniqueEmailRule.php at line 30

Class ZMUniqueEmailRule

ZMObject
└─ZMRule
└─ZMUniqueEmailRule

public class ZMUniqueEmailRule
extends ZMRule

Check for unique email address.

Author:
DerManoMann

Method Summary
void

__construct(string name, string msg, string defaultMsg)

Create new required rule.

string

toJSString()

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

Method Detail

mvc\validation\ZMUniqueEmailRule.php at line 38

__construct

public void __construct(string name, string msg, string defaultMsg)

Create new required rule.

Parameters:
name - The field name.
msg - Optional message.

mvc\validation\ZMUniqueEmailRule.php at line 67

toJSString

public string toJSString()

Create JS validation call.

Returns:
Formatted JavaScript .

mvc\validation\ZMUniqueEmailRule.php at line 57

validate

public boolean validate(ZMRequest request, array data)

Validate the given request data.

Parameters:
request - The current request.
data - The data.
Returns:
true if the value for $name is valid, false if not.

ZenMagick 0.9.10