Check the price and verify the format
#rails 3
validates :price, :format => { :with => /Ad+(?:.d{0,2})?z/ }, :numericality => {:greater_than => 0, :less_than => 10}
#rails 2
validates_numericality_of :price, :greater_than => 0, :less_than => 10
validates_format_of :price, :with => /Ad+(?:.d{0,2})?z/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…