# File lib/rhc-common.rb, line 163
  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
        puts "#{type} " + regex_failed_error
        return false
      end
      if max != 0 && field.length > max
        puts "maximum #{type} size is #{max} characters"
        return false
      end
    else
      puts "#{type} is required"
      return false
    end
    true
  end