Skip to content

[UPDATE] Add Validation for 10-Digit Whatsapp Number in Registration Page #45

@AbhilashK26

Description

@AbhilashK26

Add Validation for 10-Digit Whatsapp Number in Registration Page

Description

The Whatsapp number field on the registration page currently does not have validation to ensure the number entered is exactly 10 digits long. This validation is necessary to ensure the accuracy and consistency of the data entered by users.


Task Details

  1. File to Modify:
    The Whatsapp number validation logic should be added to the registration page, located at codebase/frontend/src/pages/register.jsx.

  2. Validation Requirement:

    • The Whatsapp number must be exactly 10 digits long.
    • If the input is invalid, display an error message:
      "Whatsapp number must be exactly 10 digits."
  3. Testing:

    • Verify that the Whatsapp number field accepts only 10-digit numbers.
    • Ensure invalid inputs (e.g., fewer or more than 10 digits, or non-numeric characters) show the appropriate error message.
  4. Follow Pull Request Guidelines:

    • Use a regular expression or other appropriate validation methods to enforce this constraint.
    • Follow the Pull_request_template.md file when submitting the Pull Request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EasyDifficulty level is easybugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions