ajax and client validation in forms