By: Aman Negi user 11 Nov 2021 at 4:41 a.m. CST

0 Responses
Aman Negi gravatar
Hi Gluu support, I am looking for a way in which i can customize the error message. If both the username and password field are empty. Currently this is the error message I am receiving. Error Message: []( loginForm:j_idt12: Validation Error: Value is required. I have already tried with below snippet the error message is not changing. If username field is empty the execution of authenticate function is not happening. I think this is the issue if not StringHelper.isNotEmptyString(user_name) or not StringHelper.isNotEmptyString(user_password): facesMessages = CdiUtil.bean(FacesMessages) facesMessages.setKeepMessages() facesMessages.add(FacesMessage.SEVERITY_ERROR, "Authentication Failed: Username or Password Cannot be empty") return False If possible is there any alternate way to change this message.