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

Function isPhoneNumberValid

auth/mfa-password.ts:510–514  ·  view source on GitHub ↗

* Returns true if the input of phone number entry is valid. * @return {boolean} Whether the phone number is valid.

()

Source from the content-addressed store, hash-verified

508 * @return {boolean} Whether the phone number is valid.
509 */
510function isPhoneNumberValid() {
511 const pattern = /^\+[0-9\s\-()]+$/;
512 const phoneNumber = phoneNumberInput.value;
513 return phoneNumber.search(pattern) !== -1;
514}
515
516/**
517 * Returns true if the ReCaptcha is in an OK state.

Callers 2

onEnrollSendCodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected