ActiveModel
Using ActiveModel::Validations
Section titled “Using ActiveModel::Validations”You can validate any object, even plain ruby.
Remarks
Section titled “Remarks”ActiveModel was created to extract the model behavior of ActiveRecord into a separate concern. This allows us to use ActiveModel behavior in any object, not just ActiveRecord models.
ActiveRecord objects include all of this behavior by default.