Added AngularJS validation