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

This PR replaces https://github.com/theforeman/foreman/pull/1686
@domcleal changed to `%s` but the error is not concatenated with `Name` so I left the capital letter at the beginning