Fixes #7038: No error when hostgroup name exceeds 245 characters

This PR replaces https://github.com/theforeman/foreman/pull/1686
It will be when rendered with full_messages (in the API I think), as you get..

<pre>
 > Hostgroup.new(:name => 'a' * 300).tap { |h| h.valid? }.errors.full_messages.to_sentence
 => "Title is too long (maximum is 255 characters) and Name Maximum for this name is 245 characters" 
</pre>