[{"data":1,"prerenderedAt":518},["ShallowReactive",2],{"content-zh-TW-api":3},{"doc":4,"debug":488},{"id":5,"title":6,"body":7,"description":469,"extension":481,"meta":482,"navigation":483,"path":484,"seo":485,"stem":486,"__hash__":487},"content\u002Fzh-TW\u002Fapi.md","API 參考",{"type":8,"value":9,"toc":468},"minimark",[10,14,19,88,92,185,189,232,236,297,301,381,384,445,448],[11,12,6],"h1",{"id":13},"api-參考",[15,16,18],"h2",{"id":17},"twid-身分證統一證號","TwId — 身分證\u002F統一證號",[20,21,22,38],"table",{},[23,24,25],"thead",{},[26,27,28,32,35],"tr",{},[29,30,31],"th",{},"成員",[29,33,34],{},"回傳",[29,36,37],{},"說明",[39,40,41,58,73],"tbody",{},[26,42,43,50,55],{},[44,45,46],"td",{},[47,48,49],"code",{},"IsValid(string?)",[44,51,52],{},[47,53,54],{},"bool",[44,56,57],{},"驗證三種證號（自動辨識）；null\u002F空字串回 false，不拋例外",[26,59,60,65,70],{},[44,61,62],{},[47,63,64],{},"Validate(string?)",[44,66,67],{},[47,68,69],{},"TwIdResult",[44,71,72],{},"詳細驗證結果",[26,74,75,80,85],{},[44,76,77],{},[47,78,79],{},"Generate(TwIdKind, Gender?, int? seed)",[44,81,82],{},[47,83,84],{},"string",[44,86,87],{},"產生檢核碼合法的樣本證號",[89,90,69],"h3",{"id":91},"twidresult",[20,93,94,106],{},[23,95,96],{},[26,97,98,101,104],{},[29,99,100],{},"屬性",[29,102,103],{},"型別",[29,105,37],{},[39,107,108,122,140,155,170],{},[26,109,110,115,119],{},[44,111,112],{},[47,113,114],{},"IsValid",[44,116,117],{},[47,118,54],{},[44,120,121],{},"是否有效",[26,123,124,129,134],{},[44,125,126],{},[47,127,128],{},"Failure",[44,130,131],{},[47,132,133],{},"ValidationFailure",[44,135,136,137],{},"失敗原因；通過時為 ",[47,138,139],{},"None",[26,141,142,147,152],{},[44,143,144],{},[47,145,146],{},"Kind",[44,148,149],{},[47,150,151],{},"TwIdKind?",[44,153,154],{},"證號類型；格式無法辨識時為 null",[26,156,157,162,167],{},[44,158,159],{},[47,160,161],{},"Gender",[44,163,164],{},[47,165,166],{},"Gender?",[44,168,169],{},"性別；格式無法辨識時為 null",[26,171,172,177,182],{},[44,173,174],{},[47,175,176],{},"RegionName",[44,178,179],{},[47,180,181],{},"string?",[44,183,184],{},"戶籍（初次登記）縣市；已停用代碼附「（已停用）」",[89,186,188],{"id":187},"twidkind","TwIdKind",[20,190,191,200],{},[23,192,193],{},[26,194,195,198],{},[29,196,197],{},"值",[29,199,37],{},[39,201,202,212,222],{},[26,203,204,209],{},[44,205,206],{},[47,207,208],{},"NationalId",[44,210,211],{},"本國人身分證（第 2 碼 1\u002F2）",[26,213,214,219],{},[44,215,216],{},[47,217,218],{},"NewResidentId",[44,220,221],{},"新式外來人口統一證號（第 2 碼 8\u002F9，2021+）",[26,223,224,229],{},[44,225,226],{},[47,227,228],{},"OldResidentId",[44,230,231],{},"舊式居留證號（前 2 碼英文，2031 年前有效）",[15,233,235],{"id":234},"twban-統一編號","TwBan — 統一編號",[20,237,238,248],{},[23,239,240],{},[26,241,242,244,246],{},[29,243,31],{},[29,245,34],{},[29,247,37],{},[39,249,250,263,283],{},[26,251,252,256,260],{},[44,253,254],{},[47,255,49],{},[44,257,258],{},[47,259,54],{},[44,261,262],{},"8 碼統編驗證（含 2021 新制與第 7 碼 = 7 特例）",[26,264,265,269,274],{},[44,266,267],{},[47,268,64],{},[44,270,271],{},[47,272,273],{},"BanResult",[44,275,276,277,279,280,282],{},"詳細結果（",[47,278,114],{}," + ",[47,281,128],{},"）",[26,284,285,290,294],{},[44,286,287],{},[47,288,289],{},"Generate(int? seed)",[44,291,292],{},[47,293,84],{},[44,295,296],{},"產生檢核合法的樣本統編",[15,298,300],{"id":299},"twphone-手機號碼","TwPhone — 手機號碼",[20,302,303,313],{},[23,304,305],{},[26,306,307,309,311],{},[29,308,31],{},[29,310,34],{},[29,312,37],{},[39,314,315,332,346,368],{},[26,316,317,321,325],{},[44,318,319],{},[47,320,49],{},[44,322,323],{},[47,324,54],{},[44,326,327,328,331],{},"嚴格驗證：",[47,329,330],{},"09"," 開頭 10 碼純數字",[26,333,334,338,343],{},[44,335,336],{},[47,337,64],{},[44,339,340],{},[47,341,342],{},"PhoneResult",[44,344,345],{},"詳細結果",[26,347,348,353,357],{},[44,349,350],{},[47,351,352],{},"TryNormalize(string?, out string)",[44,354,355],{},[47,356,54],{},[44,358,359,360,363,364,367],{},"正規化 ",[47,361,362],{},"+886","\u002F",[47,365,366],{},"886"," 國碼、空格、dash、括號、句點、全形數字後驗證",[26,369,370,374,378],{},[44,371,372],{},[47,373,289],{},[44,375,376],{},[47,377,84],{},[44,379,380],{},"產生格式合法的樣本號碼",[15,382,133],{"id":383},"validationfailure",[20,385,386,394],{},[23,387,388],{},[26,389,390,392],{},[29,391,197],{},[29,393,37],{},[39,395,396,405,415,425,435],{},[26,397,398,402],{},[44,399,400],{},[47,401,139],{},[44,403,404],{},"驗證通過",[26,406,407,412],{},[44,408,409],{},[47,410,411],{},"NullOrEmpty",[44,413,414],{},"null、空字串或全空白",[26,416,417,422],{},[44,418,419],{},[47,420,421],{},"InvalidLength",[44,423,424],{},"長度錯誤",[26,426,427,432],{},[44,428,429],{},[47,430,431],{},"InvalidFormat",[44,433,434],{},"字元種類或位置不符規則",[26,436,437,442],{},[44,438,439],{},[47,440,441],{},"InvalidChecksum",[44,443,444],{},"檢核碼錯誤",[15,446,447],{"id":447},"例外行為",[449,450,451,452,456,457,460,461,463,464,467],"p",{},"驗證路徑",[453,454,455],"strong",{},"一律不拋例外","。唯一會拋例外的情況：",[47,458,459],{},"TwId.Generate"," 收到未定義的 ",[47,462,188],{}," 時拋 ",[47,465,466],{},"ArgumentOutOfRangeException","。",{"title":469,"searchDepth":470,"depth":471,"links":472},"",2,3,[473,477,478,479,480],{"id":17,"depth":470,"text":18,"children":474},[475,476],{"id":91,"depth":471,"text":69},{"id":187,"depth":471,"text":188},{"id":234,"depth":470,"text":235},{"id":299,"depth":470,"text":300},{"id":383,"depth":470,"text":133},{"id":447,"depth":470,"text":447},"md",{},true,"\u002Fzh-tw\u002Fapi",{"title":6,"description":469},"zh-TW\u002Fapi","RzvLm07V-OxGp9wY9SzmczAGTW6GHgsRE7UxEXs9GWI",{"matched":489,"target":490,"all":491},"fallback (.all() + manual match)","\u002Fzh-TW\u002Fapi",[492,497,502,507,508,513],{"path":493,"id":494,"stem":495,"title":496},"\u002Fen\u002Fapi","content\u002Fen\u002Fapi.md","en\u002Fapi","API Reference",{"path":498,"id":499,"stem":500,"title":501},"\u002Fen\u002Fchangelog","content\u002Fen\u002Fchangelog.md","en\u002Fchangelog","Changelog",{"path":503,"id":504,"stem":505,"title":506},"\u002Fen\u002Fgetting-started","content\u002Fen\u002Fgetting-started.md","en\u002Fgetting-started","Getting Started",{"path":484,"id":5,"stem":486,"title":6},{"path":509,"id":510,"stem":511,"title":512},"\u002Fzh-tw\u002Fchangelog","content\u002Fzh-TW\u002Fchangelog.md","zh-TW\u002Fchangelog","更新紀錄",{"path":514,"id":515,"stem":516,"title":517},"\u002Fzh-tw\u002Fgetting-started","content\u002Fzh-TW\u002Fgetting-started.md","zh-TW\u002Fgetting-started","快速開始",1783231662482]