Changing error messages to be client-side as well as server-side