Full example of client side form validation with Angular JS