Ajax validation for Angularjs