Module: ActiveItem::Validations
- Included in:
- Base
- Defined in:
- lib/active_item/validations.rb
Overview
Convenience validation macro for uniqueness (DynamoDB-specific). Length, numericality, and format validations are provided by ActiveModel.
Instance Method Summary collapse
Instance Method Details
#validates_uniqueness_of(*attributes, **options) ⇒ Object
43 44 45 |
# File 'lib/active_item/validations.rb', line 43 def validates_uniqueness_of(*attributes, **) validates(*attributes, uniqueness: .empty? || ) end |