ajax and validation working