[2.x] Define user name validations as validation constraints

Created on 22 April 2024, about 1 year ago

Problem/Motivation

Currently, we validate the username through hooking into both the user_form and user_register_form and applying a custom validate callback method to the forms "#validate" key.

Instead, it might make more sense to put the username validation and ajax username validation into their own respective entity validation constraint classes. This way we cleanly apply the validation on the user entity itself instead of manually hooking into each of the forms and applying the validation manually.

Steps to reproduce

Proposed resolution

Create validation constraints for "username_validation_username_validate()" and "username_validation_ajax()".

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024