MCPcopy Create free account
hub / github.com/firebase/quickstart-js / isPhoneNumberValid

Function isPhoneNumberValid

auth/phone-invisible.ts:167–171  ·  view source on GitHub ↗

* Returns true if the phone number is valid.

()

Source from the content-addressed store, hash-verified

165 * Returns true if the phone number is valid.
166 */
167function isPhoneNumberValid() {
168 const pattern = /^\+[0-9\s\-\(\)]+$/;
169 const phoneNumber = getPhoneNumberFromUserInput();
170 return phoneNumber.search(pattern) !== -1;
171}
172
173/**
174 * Re-initializes the ReCaptacha widget.

Callers 2

onSignInSubmitFunction · 0.70
updateSignInButtonUIFunction · 0.70

Calls 1

Tested by

no test coverage detected