Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9058 from gtorodelvalle/dialer-bug-859719-follow-…
Browse files Browse the repository at this point in the history
…up-to-835750

Bug 859719 - [Dialer] Follow up to bug 835750 - Validate the numbers that are passed to the RIL to dial.
  • Loading branch information
gtorodelvalle committed Apr 9, 2013
2 parents fa102d1 + 038e2c7 commit 77e291f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions apps/communications/dialer/js/telephony_helper.js
Expand Up @@ -72,14 +72,8 @@ var TelephonyHelper = (function() {
}

var isValid = function t_isValid(sanitizedNumber) {
if (sanitizedNumber) {
var matches = sanitizedNumber.match(/[0-9#+*]{1,50}/);
if (matches.length === 1 &&
matches[0].length === sanitizedNumber.length) {
return true;
}
}
return false;
var validExp = /^[0-9#+*]{1,50}$/;
return validExp.test(sanitizedNumber);
};

var displayMessage = function t_displayMessage(message) {
Expand Down

0 comments on commit 77e291f

Please sign in to comment.