https://hackershare.dev/en/bookmarks/4237
Rails 6 adds ActiveModel::Errors#of_kind?