. */ /** * Doctrine_Validator_Notblank * * @package Doctrine * @category Object Relational Mapping * @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_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); } }