mazey
    Preparing search index...

    Function isCNMobileNumber

    • Check whether a string has the 11-digit Chinese mobile-number format.

      The pattern requires a leading 1 followed by ten digits. It does not verify assigned prefixes, ownership, reachability, or international formats.

      Usage:

      import { isCNMobileNumber } from "mazey";

      const ret1 = isCNMobileNumber("13800138000");
      const ret2 = isCNMobileNumber("1380013800");
      const ret3 = isCNMobileNumber("138001380000");
      const ret4 = isCNMobileNumber("1380013800a");
      console.log(ret1, ret2, ret3, ret4);

      Output:

      true false false false
      

      Parameters

      • mobile: string

        The string to check.

      Returns boolean

      Whether the string matches the Chinese mobile-number format.