Closed gvasanka closed 4 years ago
The message shown in the error dialog box is configured in user-mgt.xml (in case of a primary userstore) under the relevant <UserStoreManager>
as follows.
<Property name="UsernameJavaRegExViolationErrorMsg">Username pattern policy violated</Property>
In case this property is missing, the below default error message is shown.
“Entered user name is not conforming to policy. Please enter a user name, which adheres to policy.”
So you should be able to resolve this concern by setting a meaningful error message in the relevant <UserStoreManager>
in <PRODUCT_HOME>/repository/conf/user-mgt.xml
. (For secondary user stores changes should be applied to relevant config files in <PRODUCT_HOME>/repository/deployment/server/userstores
folder)
For more details below is the source code governing this behaviour. [1]. https://github.com/wso2-support/carbon-identity-framework/blob/support-5.7.5/components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/add-step1.jsp#L190
Now I have the following config for both Primary and Secondary user stores
When I am adding an invalid user to Primary user store, getting above configured error message. But when adding to secondary user store getting an error message as below.
For the error with secondary userstores, will you please check whether the following regex property is set to an appropriate regex value (to support email usernames) in your secondary user store configuration ?
Ex: <Property name="UsernameJavaScriptRegEx">
^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}$</Property>
If not, please add and check whether you are getting the expected error message thereafter.
closing since an answer is provided
Description: [Improvement] Should show an understandable error message to non-technical users when try to add user without providing email
Suggested Labels: Priority/Low Severity/Minor
Suggested Assignees:
Affected Product Version: API 210
OS, DB, other environment details and versions:
Steps to reproduce:
Issue: Getting issue as in attached image which is not understandable
Related Issues: https://github.com/wso2/financial-open-banking/issues/328