* Returns true if the phone number is valid.
()
| 165 | * Returns true if the phone number is valid. |
| 166 | */ |
| 167 | function 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. |
no test coverage detected