geminilabs

[site-reviews] Restrict maximum title length

Oct 23rd, 2021
867
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Restrict the title to 80 characters
  3.  * @return array
  4.  */
  5. add_filter('site-reviews/validation/rules', function ($rules) {
  6.     $rules['title'] = 'required|max:80';
  7.     return $rules;
  8. });
RAW Paste Data