Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
できる!!! Validation !!! - builderscon tokyo 2017
Search
kazusuke sasezaki
January 13, 2024
220
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
できる!!! Validation !!! - builderscon tokyo 2017
builderscon tokyo 2017
kazusuke sasezaki
January 13, 2024
More Decks by kazusuke sasezaki
See All by kazusuke sasezaki
PHPでの .gitattributes
sasezaki
0
180
はじめてのミューテーション解析 / Mutation Testing
sasezaki
2
1.7k
こんなPHP開発者はイヤだ
sasezaki
2
3.9k
Introduction of Web scraping for PHP users
sasezaki
0
140
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Are puppies a ranking factor?
jonoalderson
2
4.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
2
1k
Marketing to machines
jonoalderson
1
6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
670
Amusing Abliteration
ianozsvald
1
380
Ethics towards AI in product and experience design
skipperchong
2
460
The Invisible Side of Design
smashingmag
301
52k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Transcript
できる!!! Validation !!! @sasezaki
LT LT は は 15 15 分越えの 分越えの 世界から来ました 世界から来ました
... ...
みなさんは、普段 清く正しく美しく バリデートを実装してますか?
無理!
世界は欺瞞であふれてるのに 真偽なんて判定できるわけないだろ!
バリデートって一体何なんだろう?
「バリデート 」 が何を指してるかはっきりさせないと・・・ Web アプリケーションにおいて バリデーション ( 以下バリデーションとは アプリケーションの最初の段階で 行われる入力値検証、いわゆる
フォームバリデーションを指します ) CMS 四天王のバリデーション状況を調査したところ意外な結果になった | 徳丸浩の日記 ] http://blog.tokumaru.org/2015/06/cms.html Web アプリケーションにおいて バリデーション ( 以下バリデーションとは アプリケーションの最初の段階で 行われる入力値検証、いわゆる フォームバリデーションを指します ) CMS 四天王のバリデーション状況を調査したところ意外な結果になった | 徳丸浩の日記 ] http://blog.tokumaru.org/2015/06/cms.html assert 防御的プログラミング guard 例外 フィルタリング 入力エラー チェック スカラー値? 複合条件 ? 多次元配列 ? x-www-form-urlencoded / JsonSchema
末代まで遺恨を残す
バリデート…こんなスタンスで作業 始めがち
死ぬ
「空白 は はじいて」
死ぬ
「空白 は はじいて」
「このフィールドは アルファベットで」
死ぬ
「このフィールドは アルファベットで」
この正規表現を コピペすれば 楽になれるよ
死ぬ
「正常系じゃない場合の エラーメッセージの 取得をどうしよう? ・・・ あ、思いついた!」
死ぬ
None
※ 先ほどのコード例は、 "php validation library" で ググって一番トップに来る 星の数 4000
位のプロジェクトから の引用です。
「有効でない オブジェクトと 判定したら 例外だー!」
死ぬ
None
None
結論: 検証の結果、人類の存 在があやまりだった。
完