/// <summary>指定された文字列が電話番号(日本, ハイフン有り)であるか。</summary> /// <param name="input">入力文字列</param> /// <returns> /// true:電話番号(日本, ハイフン有り)である。 /// false:電話番号(日本, ハイフン有り)でない。 /// </returns> public static bool IsJpTelephoneNumber_Hyphen(string input) { // 電話番号(日本, ハイフン有り)形式 return( FormatChecker.IsJpFixedLinePhoneNumber_Hyphen(input) | FormatChecker.IsJpCellularPhoneNumber_Hyphen(input) | FormatChecker.IsJpIpPhoneNumber_Hyphen(input)); }
/// <summary>指定された文字列が携帯電話番号(日本)であるか。</summary> /// <param name="input">入力文字列</param> /// <returns> /// true:携帯電話番号(日本)形式である。 /// false:携帯電話番号(日本)形式でない。 /// </returns> /// <remarks> /// <総務省> /// 電話番号に関するQ&A /// http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/q_and_a-2001aug.html /// 電気通信番号指定状況 /// http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html /// 電気通信サービスFAQ(よくある質問)-6.電話番号について /// http://www.soumu.go.jp/main_sosiki/joho_tsusin/d_faq/6Telephonenumber.htm /// ※ 020はポケベル、060はFMC、070はPHS、080・090は携帯、11桁。 /// </remarks> public static bool IsJpCellularPhoneNumber(string input) { // 携帯定電話番号(日本)形式 return(FormatChecker.IsJpCellularPhoneNumber_Hyphen(input) | FormatChecker.IsJpCellularPhoneNumber_NoHyphen(input)); }