This is just calling the method, it's not actually validating anything. I think what you want is this:

```ruby
validate :max_group_number_not_exceeded
```
And then the actual method needs to add something to `errors` if the validation fails. See the Rails guide for instructions on adding custom validator methods:

http://guides.rubyonrails.org/active_record_validations.html#custom-methods