Source for file Numeric.php
Documentation is available at Numeric.php
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at
* http://formagic.weasle.de/licence.txt
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to licence@weasle.de so we can send you a copy immediately.
* @author Florian Sonnenburg
* @copyright Copyright (c) 2007 Florian Sonnenburg
* @license http://formagic.weasle.de/licence.txt New BSD License
* @revision $Revision: 17 $
require_once('Rule.php');
* Checks if value is numeric
* @author Florian Sonnenburg
* @copyright Copyright (c) 2007 Marc Schrader
* @version $Id: Numeric.php 17 2007-08-19 20:40:10Z meweasle $
* Numeric rule checks if value is numeric.
* @param Formagic_Item $itemObj
public function check($item)
$value = $item->getValue();
if (!$value && !$item->hasRule('mandatory')) {
|