module Spree
  module Validations
    class DbMaximumLengthValidator < ActiveModel::Validator
      def validate(record)
        field = @field.to_sym
        limit = record.column_for_attribute(field).limit
        value = record[field]
        if value && limit && value.to_s.length > limit
          record.errors.add(field, :too_long, count: limit)
        end
      end
    end
  end
end

module Spree
  module Validations
    class DbMaximumLengthValidator < ActiveModel::Validator
      def validate(record)
        field = options[:field]
        limit = record.column_for_attribute(field).limit
        value = record[field]
        if value && limit && value.to_s.length > limit
          record.errors.add(field, :too_long, count: limit)
        end
      end
    end
  end
end

Use the right syntax for DbMaximumLengthValidator
Use the right syntax for DbMaximumLengthValidator

Not sure how could it be working before this fix...
