Added validation feature and display error message accordingly on registration page using angularJS