implement client-side validation when creating new view and display error message