In current code, a snackbar message is displayed, this is wrong. The input should be highlighted if it fails the validation.