Skip to content

Commit

Permalink
fix: text should be treated inValid in isValidPhoneNumber [ATLAS-196] (
Browse files Browse the repository at this point in the history
…#127)

* [fix]: text should be treated inValid

* Create green-icons-tease.md

---------

Co-authored-by: Tarun Khanna <[email protected]>
  • Loading branch information
RgnDunes and tarun-khanna authored Apr 25, 2024
1 parent eb5a756 commit 5083738
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-icons-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@razorpay/i18nify-js": patch
---

fix: text should be treated inValid in isValidPhoneNumber [ATLAS-196]
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const isValidPhoneNumber = (
): boolean => {
// Clean the provided phoneNumber by removing non-numeric characters
const cleanedPhoneNumber = cleanPhoneNumber(phoneNumber.toString());
if (!cleanedPhoneNumber) return false;

const regexMapper = PHONE_REGEX_MAPPER;
// Detect or validate the country code
Expand Down

0 comments on commit 5083738

Please sign in to comment.