X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FCallApp.cpp;h=678d5ba3820e03670367759d4a212661dab8b365;hb=4f9ce1622ba528aca7834f198a0830bdd1f8cd93;hp=81832ed32d9c66b785b607e420900f325fab14d0;hpb=8c8b8fd7ef789c7e8e28c1fcc73a68df03140520;p=apps%2Fosp%2FCall.git diff --git a/src/CallApp.cpp b/src/CallApp.cpp index 81832ed..678d5ba 100644 --- a/src/CallApp.cpp +++ b/src/CallApp.cpp @@ -516,16 +516,12 @@ CallApp::CheckNumberIsValid(String phoneNumber) { //Pattern to compare all characters except 0-9 * # P ; , + String phoneNumberPattern(L"[^0-9*#P,p+;]"); - String phoneNumberEndingWithHash(L"#$"); - RegularExpression checkPhoneNumber,checkHash; + RegularExpression checkPhoneNumber; checkPhoneNumber.Construct(phoneNumberPattern); - checkHash.Construct(phoneNumberEndingWithHash); //If there is any character other than these listed above then display invalid number bool resultMatch = checkPhoneNumber.Match(phoneNumber,false); //return false for patterns other than 0-9 * # P ; , + - bool endsWithHash = checkHash.Match(phoneNumber,false); - //returns false for any numbers that end with Hash - if(resultMatch == true || endsWithHash == true) + if(resultMatch == true) { //return phone number is invalid return false;