. */ /** * Doctrine_Validator_Unsigned * * @package Doctrine * @subpackage Validator * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 1080 $ * @author Konsta Vesterinen */ class Doctrine_Validator_Unsigned { /** * checks if given value is a valid unsigned integer * * @param mixed $value * @return boolean */ public function validate($value) { $int = (int) $value; if ($int != $value || $int < 0) { return false; } return true; } }