Method: ContentfulLite::Validations::Entry.validates_included_asset
- Defined in:
- lib/contentful_lite/validations/entry.rb
.validates_included_asset(*attr_names, **options) ⇒ Object
Adds a validation on one or more fields to ensure it’s a reference field and the values are assets
47 48 49 50 51 |
# File 'lib/contentful_lite/validations/entry.rb', line 47 class_methods do def validates_included_asset(*attr_names) validates_with IncludedAssetValidator, _merge_attributes(attr_names) end end |