. */ /** * Doctrine_Validator_Notblank * * @package Doctrine * @subpackage Validator * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.org * @since 1.0 * @version $Revision: 3882 $ * @author Konsta Vesterinen */ class Doctrine_Validator_Notblank extends Doctrine_Validator_Driver { /** * checks that value isn't blank * a value is blank when its either null or contains only space characters * * @param mixed $value * @return boolean */ public function validate($value) { return (trim($value) !== '' && $value !== null); } }