DynamoDB Dynomite Model Validations

Important: These docs are for the outdated Jets 5 versions and below. For the latest Jets docs: docs.rubyonjets.com

Dynomite provides support for validations by leveraging ActiveModel.

class User < ApplicationItem
  validates :name, presence: true
  validates :email, uniqueness: true
end

More docs: Active Record Validations.

To bypass validation:

user.save(validate: false)