You can validate any object, even plain ruby.
class User
include ActiveModel::Validations
attr_reader :name, :age
def initialize(name, age)
@name = name
@age = age
end
validates :name, presence: true
validates :age, numericality: { only_integer: true, greater_than...