Skip to content

Commit

Permalink
Update existing_username_validator.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
shleeable committed Aug 15, 2022
1 parent 255c5d9 commit eec1f57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/validators/existing_username_validator.rb
Expand Up @@ -21,8 +21,8 @@ def validate_each(record, attribute, value)

if options[:multiple]
record.errors.add(attribute, I18n.t('existing_username_validator.not_found_multiple', usernames: usernames_with_no_accounts.join(', '))) if usernames_with_no_accounts.any?
else
record.errors.add(attribute, I18n.t('existing_username_validator.not_found')) if usernames_with_no_accounts.any? || usernames_and_domains.size > 1
elsif usernames_with_no_accounts.any? || usernames_and_domains.size > 1
record.errors.add(attribute, I18n.t('existing_username_validator.not_found'))
end
end
end

0 comments on commit eec1f57

Please sign in to comment.