. */ /** * Doctrine_Validator_Nospace * * @package Doctrine * @subpackage Validator * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision$ * @author Konsta Vesterinen */ class Doctrine_Validator_Nospace extends Doctrine_Validator_Driver { /** * checks that value doesn't contain any space chars * * @param mixed $value * @return boolean */ public function validate($value) { return ($value === null || ! preg_match('/\s/', $value)); } }