def validate_each(record, attribute, value)
        if value.nil?
          record.errors.add(attribute, :blank)
          return
        end

        case record.type_for_attribute(attribute).type
        when :json, :polymorphic
          call_json_strategy(record, attribute, value)
        when :array, :polymorphic_array
          call_array_strategy(record, attribute, value)
        end
      end
Validates _json_ attribute using the configured strategy or
invalidates _array_ attribute when at least one element is invalid.

@param record [ApplicationRecord] object to validate
@param attribute [String] name of the validated attribute
@param value [Object] value of the validated attribute