Class: UserFullNameValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- UserFullNameValidator
- Defined in:
- lib/validators/user_full_name_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
4 5 6 |
# File 'lib/validators/user_full_name_validator.rb', line 4 def validate_each(record, attribute, value) record.errors.add(attribute, :blank) if SiteSetting.full_name_required && !record.name.present? end |