This is a set of extensions for PORO objects to help in data coercion and validation. It was extracted from rom-rails and for now it uses Virtus and ActiveModel.
The package includes:
ROM::Attributesfor defining input attributes with types and coercion rules
ROM::Validatora standalone validator object extension built on top of
ActiveModel::Validationswith additional features like nested validators
It is very likely this gem will be deprecated. For now please consider using dry-validation along with dry-types instead of rom-model. We may integrate rom-model with these libs to provide persistence-related features for dry-validation, or just abandon rom-model completely. Time will tell.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install rom-model