On 29 Oct 2023, at 11:50, Marcelo wrote:

I don't see the *validation_helpers* plugin adding a *before_validation*
class method:
https://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Plugins/ValidationHelpers.html

You can see in the docs how this plugin only adds some *validates_**
methods, which should be called inside the model's *validate* method.

This *before_validation* class method is something that exists in
Rails/ActiveRecord; I'm not sure it exists in Sequel.

Validations are in the base Model class:

  
http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html#label-Model+Validations

As are the validation hooks (including `before_validation`), though they're instance methods not class methods:

  
http://sequel.jeremyevans.net/rdoc/files/doc/model_hooks_rdoc.html#label-Available+Hooks

The plugin just contains methods that help with common validation tasks.

--
Michael Granger <rubym...@gmail.com>

--
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/0FEF50CD-CDAC-4B86-872D-E3C44A4F4036%40gmail.com.

Reply via email to