Client-side validation with AngularJS