- Issue created by @Grevil
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.
Create validation constraints for "username_validation_username_validate()" and "username_validation_ajax()".
Active
2.0
Code