class ActiveModel::Validator

def validate(record)

to the records +errors+ array where necessary.
Override this method in subclasses with validation logic, adding errors
def validate(record)
  raise NotImplementedError, "Subclasses must implement a validate(record) method."
end