ZenMagick 0.9.8


org.zenmagick.store.mvc.validation.ZMGVAmountRule
\store\mvc\validation\ZMGVAmountRule.php at line 34

Class ZMGVAmountRule

ZMObject
└─ZMRule
└─ZMGVAmountRule

public class ZMGVAmountRule
extends ZMRule

Validate the amount against the current account's gv balance.

NOTE: The amount is expected to be of type float and must not contains any currency formatting.

Author:
DerManoMann
Version:
$Id: ZMGVAmountRule.php 2694 2009-12-03 22:32:18Z dermanomann $

Constructor Summary

ZMGVAmountRule(string name, string msg)

Create new required rule.

Method Summary
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
getDefaultMsg, getErrorMsg, getJSName, getMsg, getName, setDefaultMsg, setMsg, setName, toJSString, validate
Methods inherited from org.zenmagick.core.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

\store\mvc\validation\ZMGVAmountRule.php at line 42

ZMGVAmountRule

public ZMGVAmountRule(string name, string msg)

Create new required rule.

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

Method Detail

\store\mvc\validation\ZMGVAmountRule.php at line 91

toJSString

public string toJSString()

Create JS validation call.

Returns:
Formatted JavaScript .

\store\mvc\validation\ZMGVAmountRule.php at line 61

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.8