class ProhibitedValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/prohibited/prohibited_validator.rb, line 4
def validate_each(record, attribute, value)
  if ProhibitedUsernames::include?(value)
    record.errors[attribute] << (options[:message] || "#{value} is reserved")
  end
end