ShawnMcCool/laravel-form-base-model — pull request #9 by aaruff (2013-02-01 20:43:12+00:00)
Title: Added custom validation hook to base.php 

I have added validation register to the base class, which allows custom validation closures to be passed to the base model to be used for validation of field_data.

__Usage Example: from within an extended FormBaseModel\Base class__

public static function before_validation()
{
static::register_validation('validation_tag', function($attributes, $value, $parameters) {
// custom validation
});
}

The register_validation function places the validation closure into a $validators array class variable. The validators are registered with the $validation class after it is created in the is_valid() function base.php#170.