Skip to content

Self-registration flow lacks client-side validation for username, email, and phone etc. causing backend validation failures and generic error page #27211

@nishagii

Description

@nishagii

Description

The self-registration flow in WSO2 Identity Server does not perform proper client-side validation for multiple user input fields such as username, email, and phone number etc.

As a result, invalid inputs are accepted by the UI but rejected by backend validation during user creation. This causes the flow to fail and redirects users to a generic "Flow execution unsuccessful" page without meaningful feedback.

Current behavior after an invalid submit:

Image

This leads to a poor user experience.

Steps to Reproduce

Steps to Reproduce

  1. Navigate to the self-registration page
  2. Enter invalid inputs (validation is performed sequentially, and only the first invalid field triggers an error. Therefore, preceding fields must contain valid values to test a specific field):
  • Username: Testing User (contains spaces)
  • Email: invalid-email (e.g., 3mail4ake@@@, incorrect format)
  • Phone: 1234abcd (invalid format)
  • Password: valid password
  1. Submit the form
  2. Observe:
  • Redirection to "Flow execution unsuccessful" page
  1. Check server logs:
Caused by: org.wso2.carbon.user.core.UserStoreException: 31301 - Username Testing User is not valid. User name must match: ^[^\s*?%]{3,50}$

Caused by: org.wso2.carbon.user.core.UserStoreClientException: Email is not in the correct format.

Caused by: org.wso2.carbon.user.core.UserStoreClientException: Telephone is not in the correct format.

Expected Behavior

Client-side validation should prevent invalid inputs before submission OR backend validation errors should be properly propagated and displayed as field-level error messages

Version

wso2is-7.3.0-m2-SNAPSHOT

Environment Details (with versions)

No response

Developer Checklist

  • [Behavioural Change] Does this change introduce a behavioral change to the product?
  •  ↳ Approved by team lead
  •  ↳ Label impact/behavioral-change added
  • [Migration Impact] Does this change have a migration impact?
  •  ↳ Migration label added (e.g., 7.2.0-migration)
  •  ↳ Migration issues created and linked
  • [New Configuration] Does this change introduce a new configuration?
  •  ↳ Label config added
  •  ↳ Configuration is properly documented

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions