Skip to content

Commit

Permalink
Added the buildValidation event to behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 5, 2014
1 parent 07cc015 commit 7bfc102
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ORM/Behavior.php
Expand Up @@ -53,8 +53,13 @@
* $primary parameter indicates whether or not this is the root query,
* or an associated query.
*
* - `buildValidator(Event $event, Validator $validator, string $name)`
* Fired when the validator object identified by $name is being built. Yiu can use this
* callback to add validation rules or add validation providers.
*
* - `buildRules(Event $event, RulesChecker $rules)`
* Allows listeners to modify the rules checker by adding more rules.
* Fired when the rules checking object for the table is being built. You can use this
* callback to add more rules to the set.
*
* - `beforeRules(Event $event, Entity $entity, RulesChecker $rules)`
* Fired before an entity is validated using the rules checker. By stopping this event,
Expand Down Expand Up @@ -243,6 +248,7 @@ public function implementedEvents() {
'Model.afterSave' => 'afterSave',
'Model.beforeDelete' => 'beforeDelete',
'Model.afterDelete' => 'afterDelete',
'Model.buildValidator' => 'buildValidator',
'Model.buildRules' => 'buildRules',
'Model.beforeRules' => 'beforeRules',
'Model.afterRules' => 'afterRules',
Expand Down

0 comments on commit 7bfc102

Please sign in to comment.