added validation but ajax post not working