using namespace Tizen::System;
using namespace Tizen::Base::Collection;
using namespace Tizen::Telephony;
+using namespace Tizen::Base::Utility;
const char* callEventList[] = {
TAPI_NOTI_VOICE_CALL_STATUS_IDLE,
{
r = E_FAILURE;
}
+
+ //Pattern to compare all characters except 0-9 * # P ; , +
+ String phoneNumberPattern(L"[^0-9*#P,p+;]");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ //If there is any character other than these listed above then display invalid number
+ bool resultMatch = checkPhoneNumber.Match(contactNumber,false);
+ //return false for patterns other than 0-9 * # P ; , +
+ if(resultMatch == true)
+ {
+ //return phone number is invalid
+ r = E_FAILURE;
+ }
//TODO: check if valid phone number else return error message
return r;
}