Files
Michael Hulse 5db9f6d757 allow spaces in login and registration input fields
When users typed spaces into username, password, email, or
code fields on Canvas login and registration pages, the input
was immediately trimmed, preventing spaces from being entered.
However, copy-pasting text with spaces worked correctly.

Removed `.trim()` calls from all input change handlers in:
- SignIn (username, password)
- ForgotPassword (email)
- OtpForm (verification code)
- Student registration (username, email, join code)
- Teacher registration (email)
- Parent registration (email, pairing code)

Form validation still prevents empty/whitespace-only
submissions by using `.trim()` in the validateForm() method.

The backend applies its own normalization and validation,
ensuring data integrity.

closes AE-2112
flag=login_registration_ui_identity

[skip-crystalball]

test plan:
- type spaces in username field during login, expect spaces
  to be preserved in the input
- type spaces in password field during login, expect spaces
  to be preserved
- type spaces in email field on forgot password, expect spaces
  to be preserved
- type spaces in verification code on otp form, expect spaces
  to be preserved
- type spaces in registration fields (username, email, codes),
  expect spaces to be preserved
- submit login form with spaces in credentials, expect form to
  submit with spaces intact
- submit form with whitespace-only input, expect validation
  error
- run all new_login tests and verify existing validation tests
  still pass

Change-Id: I42fb4cdafed8a1284e8bfced8af7293171e9b651
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/400831
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
2026-02-20 20:01:19 +00:00
..