lib/globalize-validations/concern.rb
# This validation will perform a validation round against each globalized locales
# and add errors for globalized attributes names
This validation will perform a validation round against each globalized locales
and add errors for globalized attributes names
This validation will perform a validation round against each globalized locales and add errors for globalized attributes names
def validates_globalized_attributes
        return unless Globalize.locale == I18n.locale
        locales = if globalize_validations_locales.respond_to?(:call)
                    globalize_validations_locales.call(self)
                  else
                    globalize_validations_locales
                  end
        locales ||= []
        globalized_errors_for_locales(translated_attribute_names, locales)
      end
def validates_globalized_attributes return unless Globalize . locale == I18n . locale locales = if globalize_validations_locales . respond_to? ( :call ) globalize_validations_locales . call ( self ) else globalize_validations_locales end locales ||= [ ] globalized_errors_for_locales ( translated_attribute_names , locales ) end
This validation will perform a validation round against each globalized locales
and add errors for globalized attributes names
This validation will perform a validation round against each globalized locales and add errors for globalized attributes names
# Only validates globalized attributes from the admin locale # Define which locales to validate against