Skip to content

Conversation

ShashankChilukuri
Copy link

This pull request adds a new algorithm to validate Indian 10-digit phone numbers using regular expressions.

✅ The function uses Python's re.fullmatch() to match valid phone numbers.

✅ It checks that the phone number starts with 6, 7, 8, or 9 and contains exactly 10 digits.

✅ The function is defined as validate_phone_number(phone: str) -> bool.

✅ It includes multiple doctests for automatic validation.

✅ The file is located in strings/phone_number_validator.py and follows the project’s coding and contribution standards.

This function is useful for basic input validation in form processors, mobile apps, and backend systems that deal with Indian users.

@algorithms-keeper algorithms-keeper bot added tests are failing Do not merge until tests pass labels Jun 23, 2025
@algorithms-keeper algorithms-keeper bot added the awaiting reviews This PR is ready to be reviewed label Jun 23, 2025
@cclauss
Copy link
Member

cclauss commented Oct 14, 2025

Closing tests_are_failing PRs to prepare for Hacktoberfest

@cclauss cclauss closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants