# File lib/rhc-common.rb, line 176
  def self.check_field(field, type, max=0, val_regex=/[^0-9a-zA-Z]/, 
                       regex_failed_error='contains non-alphanumeric characters!')
    if field
      if field =~ val_regex
        say "#{type} " + regex_failed_error
        return false
      end
      if max != 0 && field.length > max
        say "maximum #{type} size is #{max} characters"
        return false
      end
    else
      say "#{type} is required"
      return false
    end
    field
  end