Leading / Trailing whitespace in the `name` field when creating a user are persisted
Steps to reproduce
- Go to Menu > Admin > Users > New user and create a user with leading/trailing whitespaces in the name, for instance
test-user
. - After that, go to
User administration
and clickDelete user
orDelete user and contributions
. - Name will be shown without whitespaces in the user delete confirmation modal, and delete button will be inactive if one types the name shown in the modal.
What is the current bug behavior?
Whitespaces in the user name
field are persisted
What is the expected correct behavior?
- Whitespaces should be trimmed from the start / end
- Whitespaces should not be persisted
Related issues
- This behaviour causes this issue #337826 (closed)
- Related to this discussion
JTBD - Draft
-
Trim leading / trailing spaces from the name field when creating a user using the StripAttribute concern -
Add validation to ensure the name
field cant contain lead/trailing spaces
Edited by Ezekiel Kigbo