MCPcopy Index your code
hub / github.com/firebase/quickstart-js / isPhoneNumberValid

Function isPhoneNumberValid

auth/phone-visible.ts:168–172  ·  view source on GitHub ↗

* Returns true if the phone number is valid.

()

Source from the content-addressed store, hash-verified

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

Callers 2

onSignInSubmitFunction · 0.70
updateSignInButtonUIFunction · 0.70

Calls 1

Tested by

no test coverage detected