def format_values(field, value, options={})
      value = value.dup
      value.to_s.strip!
      if !fields.key?(field) || fields[field][:format].nil?
        return value
      end
      rules = fields[field][:format].dup
      # ignore rules
      if options[:ignore_rules]
        rules = rules - options[:ignore_rules]
      end
      # use fullname rather than abbreviated
      # fullname rule must be applied first!
      if rules.delete('fullname') && regions[value]
        value = regions[value]
      end
      # formatting
      rules.each do |rule|
        case rule
        when 'upcase'
          value.upcase!
        end
      end
      value
    end
def format_values(field, value, options={})
      value = value.dup
      value.to_s.strip!
      if !fields.key?(field) || fields[field][:format].nil?
        return value
      end
      rules = fields[field][:format].dup
      # ignore rules
      if options[:ignore_rules]
        rules = rules - options[:ignore_rules]
      end
      # use fullname rather than abbreviated
      # fullname rule must be applied first!
      if rules.delete('fullname') && regions[value]
        value = regions[value]
      end
      # formatting
      rules.each do |rule|
        case rule
        when 'upcase'
          value.upcase!
        end
      end
      value
    end
Format a value e.g :region, 'NY'
 apply any formatting rules
  - if rule fullname included change the region to it's full name - New York
 options = ignore_rules: ['upcase']