add validation of ajax and xmlrpc