impress/app/models/neopets_connection.rb
Emi Matchu 903d6a8a19 Disallow email addresses in Neopets usernames
People are evading the filtering in the description and they know it!
Boooo!
2025-06-22 11:16:26 -07:00

6 lines
217 B
Ruby

class NeopetsConnection < ApplicationRecord
belongs_to :user
validates :neopets_username, uniqueness: {scope: :user_id},
format: { without: /@/, message: 'must not be an email address, for user safety' }
end