Source for file Mandatory.php
Documentation is available at Mandatory.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
* @version $Id: Mandatory.php 14 2007-08-13 20:33:26Z meweasle $
require_once('Rule.php');
* Checks if value is given
* @author Florian Sonnenburg
* @copyright Copyright (c) 2007 Florian Sonnenburg
* @license http://formagic.weasle.de/licence.txt New BSD License
* @version $Id: Mandatory.php 14 2007-08-13 20:33:26Z meweasle $
* Mandatory rule checks if value is given. Throws formagicRuleException if not.
* @param mixed $value Value to be checked
public function check($itemObj) {
$value = $itemObj->getValue();
|