Skip to content

fix(auth): add client-side email format & required field validation - #548

Open
nandhanay wants to merge 1 commit into
ProdigyV21:mainfrom
nandhanay:fix/auth-client-validation
Open

fix(auth): add client-side email format & required field validation#548
nandhanay wants to merge 1 commit into
ProdigyV21:mainfrom
nandhanay:fix/auth-client-validation

Conversation

@nandhanay

Copy link
Copy Markdown

Summary

Fixes #531, #532, and #533.

Previously, auth forms and addon URL inputs accepted blank fields or invalid email formats without client-side validation, causing unnecessary backend auth calls and unresponsive submission feedback.

Changes

  • Auth Site: Added validateFormInputs() in index.html to validate non-empty fields and email regex before sending requests.
  • Web Settings: Disabled Addon Install button when input is blank.
  • Android TV Settings: Added isConfirmEnabled property to InputModal to disable Confirm button and D-pad Enter when input is blank or not a valid http(s):// URL.

Copy link
Copy Markdown
Owner

Thanks, this is a useful UX improvement. I tested the exact merge against current main, but one required fix remains: SettingsScreen.kt uses graphicsLayer without importing androidx.compose.ui.graphics.graphicsLayer, so both Play and Sideload Kotlin builds currently fail. I confirmed that adding that import fixes the build.

Also, the PR says it fixes #532 and #533, but these changes do not touch the Stremio migration login form. Please either add the required/email validation there as well, or update the PR scope so those issues are not marked as fixed. As a smaller improvement, the addon URL check currently accepts incomplete values such as https://; using a proper URL parser would make the validation accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Login button does not validate required fields before submission

2 participants