functional ajax requests and error checking with validates_numericality_of