Ejemplo n.º 1
0
 /// <summary>指定された文字列が電話番号(日本, ハイフン無し)であるか。</summary>
 /// <param name="input">入力文字列</param>
 /// <returns>
 /// true:電話番号(日本, ハイフン無し)である。
 /// false:電話番号(日本, ハイフン無し)でない。
 /// </returns>
 public static bool IsJpTelephoneNumber_NoHyphen(string input)
 {
     // 電話番号(日本, ハイフン無し)形式
     return(
         FormatChecker.IsJpFixedLinePhoneNumber_NoHyphen(input)
         | FormatChecker.IsJpCellularPhoneNumber_NoHyphen(input)
         | FormatChecker.IsJpIpPhoneNumber_NoHyphen(input));
 }
Ejemplo n.º 2
0
 /// <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));
 }