3
* KumbiaPHP web & app Framework
7
* This source file is subject to the new BSD license that is bundled
8
* with this package in the file LICENSE.txt.
9
* It is also available through the world-wide-web at this URL:
10
* http://wiki.kumbiaphp.com/Licencia
11
* If you did not receive a copy of the license and are unable to
12
* obtain it through the world-wide-web, please send an email
13
* to license@kumbiaphp.com so we can send you a copy immediately.
15
* Realiza validacion para campo con valor por defecto
18
* @package ActiveRecord
19
* @subpackage Validators
20
* @copyright Copyright (c) 2005-2010 Kumbia Team (http://www.kumbiaphp.com)
21
* @license http://wiki.kumbiaphp.com/Licencia New BSD License
23
class DefaultValidator implements ValidatorInterface
28
* @param ActiveRecord $object objeto ActiveRecord
29
* @param string $column nombre de columna a validar
30
* @param array $params parametros de configuracion
31
* @param boolean $update indica si es operacion de actualizacion
34
public static function validate($object, $column, $params = NULL, $update = FALSE)
36
// Se ha indicado el campo y no se considera nulo, por lo tanto no se tomara por defecto
37
if(isset($object->$column) && $object->$column != '') {
38
// Se considera con valor por defecto cuando sea nulo