Skip to content

enforce strict 10-digit phone input and support login without manual +91 prefix

Pavani Nagireddi requested to merge LoginCheckout into main

Screenshot_from_2026-02-22_15-11-09 MR description This MR improves login phone handling and validation.

Changes

  • Enforced strict 10-digit phone input on login page:
    • numeric-only input normalization
    • hard max length of 10 digits
    • validation error if phone is not exactly 10 digits
  • Updated login request flow to accept 10-digit user input while preserving backend compatibility:
    • app now tries +91<10digits> and <10digits> automatically
    • users no longer need to type +91 manually
  • Profile user number display now uses normalized 10-digit login value.

Files changed

  • src/App.tsx

Why

Users had to manually enter +91 for successful login. This caused friction and inconsistent input behavior. The new flow ensures users can log in using only a 10-digit number while keeping API integration intact.

Validation done

  • Manual code-path verification for:
    • non-digit characters removal
    • 11th digit prevention
    • exact 10-digit submit enforcement
    • login fallback attempts with and without +91

Merge request reports

Loading