public function beforeValidate(Model $model, $options = []) {
		$rules = $this->_getValidationRules($model);
		if (($rules === false) || ($rules === true)) {
			return $rules;
		}

		$validator = $model->validator();
		$validator['value'] = $rules;

		return true;
	}
public function beforeValidate(Model $model, $options = []) {
		$rules = $this->_getValidationRules($model);
		if (($rules === false) || ($rules === true)) {
			return $rules;
		}

		$validator = $model->validator();
		$validator['value'] = $rules;

		return true;
	}
public function beforeValidate ( Model $ model , $ options = [ ] ) { $ rules = $ this -> _getValidationRules ( $ model ) ; if ( ( $ rules === false ) || ( $ rules === true ) ) { return $ rules ; } $ validator = $ model -> validator ( ) ; $ validator [ 'value' ] = $ rules ; return true ; }
beforeValidate is called before a model is validated, you can use this callback to
add behavior validation rules into a models validate array. Returning false
will allow you to make the validation fail.

@param Model $model Model using this behavior
@param array $options Options passed from Model::save().
@return mixed False or null will abort the operation. Any other result will continue.
@see Model::save()
beforeValidate is called before a model is validated you can use this callback to add behavior validation rules into a models validate array . Returning false will allow you to make the validation fail .