module ContentfulLite::Validations::Entry
Public Instance Methods
errors_for_all_locales()
click to toggle source
Gets the error messages for all the locales at once @return [Hash] a hash with locale as keys and errors as values
# File lib/contentful_lite/validations/entry.rb, line 63 def errors_for_all_locales @errors end
valid_for_all_locales?()
click to toggle source
Validates all locales @return [boolean] is entry valid across al locales?
# File lib/contentful_lite/validations/entry.rb, line 55 def valid_for_all_locales? locales.map do |locale| valid?(locale: locale) end.all? end
validates_included_asset(*attr_names)
click to toggle source
# File lib/contentful_lite/validations/entry.rb, line 48 def validates_included_asset(*attr_names) validates_with IncludedAssetValidator, _merge_attributes(attr_names) end
validates_included_entry(*attr_names)
click to toggle source
# File lib/contentful_lite/validations/entry.rb, line 33 def validates_included_entry(*attr_names) validates_with IncludedEntryValidator, _merge_attributes(attr_names) end