Title: Please, add hooks to function validate_vote()
Last modified: March 18, 2017

---

# Please, add hooks to function validate_vote()

 *  [Mauricio Navarro Miranda](https://wordpress.org/support/users/mautematico/)
 * (@mautematico)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/please-add-hooks-to-function-validate_vote/)
 * As a site owner, sometimes would be valuable being able to do extend the default
   validation rules applied by _methods/stars-rating/load.php:public function validate\
   _vote()_
 * I was thinking on something like this:
 *     ```
               $_calc_vote_limit = $this->get_rule('vote_limit');
   
               +do_action('gdrts_before_velidate_vote', $meta, $item, $user, $render, $errors);
   
       	    if ($max != $_calc_stars) {
               ...
               ...
   
       	    +do_action('gdrts_after_velidate_vote', $meta, $item, $user, $render, $errors);
   
       	    if (empty($errors->errors)) {
       ```
   
 * What do you think?
    If needed, I would be glad to send you a related Pull Request.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Milan Petrovic](https://wordpress.org/support/users/gdragon/)
 * (@gdragon)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/please-add-hooks-to-function-validate_vote/#post-8928705)
 * Good suggestion, this will be on the features list for next version.
 * Milan
 *  Thread Starter [Mauricio Navarro Miranda](https://wordpress.org/support/users/mautematico/)
 * (@mautematico)
 * [9 years ago](https://wordpress.org/support/topic/please-add-hooks-to-function-validate_vote/#post-9145271)
 * ¡Hola!
 * I am looking for such update on yesterday’s release, but could not find it.
    
   In fact, I could not find any new `do_action` on this diff:
 * [https://plugins.trac.wordpress.org/changeset/1659425/gd-rating-system?old=1607934&old_path=%2Fgd-rating-system](https://plugins.trac.wordpress.org/changeset/1659425/gd-rating-system?old=1607934&old_path=%2Fgd-rating-system)
 * May be did you manage to get this on a nicer way?
 * ¡Saludos!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Please, add hooks to function validate_vote()’ is closed to new replies.

 * ![](https://ps.w.org/gd-rating-system/assets/icon.svg?rev=2889273)
 * [GD Rating System](https://wordpress.org/plugins/gd-rating-system/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gd-rating-system/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gd-rating-system/)
 * [Active Topics](https://wordpress.org/support/plugin/gd-rating-system/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gd-rating-system/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gd-rating-system/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mauricio Navarro Miranda](https://wordpress.org/support/users/mautematico/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/please-add-hooks-to-function-validate_vote/#post-9145271)
 * Status: not resolved