Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
電話番号を扱う技術
Search
Shota Iguchi
October 21, 2017
Technology
14k
21
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
電話番号を扱う技術
Shota Iguchi
October 21, 2017
More Decks by Shota Iguchi
See All by Shota Iguchi
Webpacker移行ガイド / Migrating from Webpacker to Simpacker
iguchi1124
1
620
cookpadLiveのライブ配信基盤
iguchi1124
0
1.3k
師弟登壇 2018 クックパッドで弟子入りした話
iguchi1124
1
3.2k
RackでWEBアプリケーション開発入門
iguchi1124
0
340
Other Decks in Technology
See All in Technology
Kiro WebとCloud Sessions
nagisa53
2
200
[ホンマでっか SRE] あなたはなぜ SRE に?
_awache
0
260
AI・HPC開発を支えるGPU環境の新しい選択肢 液冷GPUシステム「AquSys」の取り組み
gpuunite_official
0
250
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.3k
【書籍出版記念】 10周回って、エージェント開発は RAGがすべてだった。〜RAGの歴史と開発現場で見えた実践知〜
akiratameto
20
7.6k
AIで変わるエンジニアの働き方(仮)
naoinaoi
0
550
AI for Science時代を切り開く、政府の次世代HPC戦略の展望
gpuunite_official
0
260
AIに持続⼒を与える 判断の⻑期記憶設計
eiei114
1
720
internal/testlog で遊ぼう
rokuosan
0
230
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
20k
NANDでも描画したい!
nichica906
3
730
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
220
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
870
Measuring & Analyzing Core Web Vitals
bluesmoon
9
970
Leo the Paperboy
mayatellez
8
2.2k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
450
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
The Spectacular Lies of Maps
axbom
PRO
1
940
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
550
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
The Language of Interfaces
destraynor
162
27k
Transcript
ి൪߸Λѻ͏ٕज़ @iguchi1124
͢͜ͱ ి൪߸ΛWebαʔϏεͰར༻͢ΔͨΊʹߟྀ͢Δ͜ͱ ి൪߸ύʔαʔͷհ
MFA (Multi Factor Authentication) ࿈བྷઌͷొ ϢʔβʔID ి൪߸ΛͬͨΑ͋͘Δػೳ
໌Β͔ʹ͓͔͍͠ͷόϦσʔγϣϯ ࣮ࡍʹଘࡏ͠ಘΔి൪߸͔Ͳ͏͔ w w w w w SMS͕ૹ৴Մೳ͔Ͳ͏͔ ຊࠃ֎ͷܞଳిΛ͍ͬͯΔਓ͍Δ ి൪߸ΛαʔϏεͰར༻͍ͨ͠
ࠃࡍن֨ E164 ITU-T ͕ඪ४Խ͍ͯ͠Δి൪߸ׂܭը ి൪߸͕িಥ͠ͳ͍Α͏ʹ͢ΔΈ ి൪߸Ͳ͏ׂͬͯΒΕΔ͔
ి൪߸Ͳ͏ׂͬͯΒΕΔ͔ https://www.itu.int/rec/T-REC-E.164/
ࣾձੑ༷ ࠃҬͰి൪߸͕িಥ͠ͳ͍Α͏ʹࠃ൪߸Λ࠾൪ ࠃҬ͝ͱͰిΛ͔͚ΔͨΊͷΈ ి൪߸Ͳ͏ׂͬͯΒΕΔ͔
Ϣʔβʔ͕ೝ͍ࣝͯ͠Δి൪߸ͱ ਖ਼نԽ͞Εͨి൪߸શ͘ผ ϢʔβʔʹΑͬͯೖྗ͢Δ ి൪߸ͷϑΥʔϚοτ͕ҧ͏ +
ਖ਼نԽ͞Εͨࠃࡍి൪߸ +81 80 XXXX XXXX Country code National number ࠃίʔυΛڞ༗͍ͯ͠ΔࠃͰҰҙʹͳΔ
Ϣʔβʔ͕ೝ͍ࣝͯ͠Δి൪߸ 080 XXXX XXXX ࠃͰిSMSΛૹ৴͢Δͱ͖಄ʹ͚ͭΔ ࠃʹΑ༷͕ͬͯҟͳΔ National prefix
֤ࠃͰ࠾༻͍ͯ͠ΔࠃϓϨϑΟΫεͱࠃίʔυ ͦͷଞͷಠࣗͰ࠾༻͍ͯ͠Δ༷ SMS͕ૹ৴Ͱ͖Δి൪߸͔Ͳ͏͔ ϢʔβʔͷίϯςΩετ͕Θ͔Δ ݡ͍ύʔαʔ͕ඞཁ ి൪߸ΛόϦσʔγϣϯ͢Δ
ͦ͜Ͱ libphonenumber github.com/googlei18n/libphonenumber
libphonenumberͷίί͕ੌ͍ Google͕ϝϯςφϯε͍ͯ͠Δి൪߸ύʔαʔ ֤ࠃͷి൪߸ͷಠ༷ࣗΛௐਚͨ͘͠࠷ڧͷϝλσʔλ Λ༻ҙ͍ͯ͠Δ ͋ΒΏΔݴޠͰѻ͑ΔΑ͏ʹͳ͍ͬͯΔ Javascript, Ruby, PHP, PostgreSQL, Go,
C++Ͱར༻Ͱ͖Δ
libphonenumberͷίί͕ੌ͍ TelephoneNumber.valid?('8180XXXXXXXX') # => true TelephoneNumber.valid?('+81 80 XXXX XXXX') #
=> true TelephoneNumber.valid?('080 XXXX XXXX', 'JP') # => true require 'telephone_number' telephone_number = TelephoneNumber.parse('8180XXXXXXXX') telephone_number.e164_number # => +8180XXXXXXXX telephone_number.national_number # => 080-XXXX-XXXX telephone_number.country.country_id # => JP telephone_number.valid_types # => [:mobile] github.com/mobi/telephone_number github.com/iguchi1124/global_phone_number ruby port library (WIP)
✅ ֤ࠃͰ࠾༻͍ͯ͠ΔࠃϓϨϑΟΫεͱࠃίʔυ ✅ ͦͷଞͷಠࣗͰ࠾༻͍ͯ͠Δ༷ ✅ SMS͕ૹ৴Ͱ͖Δి൪߸͔Ͳ͏͔ ి൪߸ΛόϦσʔγϣϯ͢Δ ࣮༻ஈ֊
͓ΘΓ