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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
kazusuke sasezaki
January 13, 2024
210
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
160
はじめてのミューテーション解析 / 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
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
770
Writing Fast Ruby
sferik
630
63k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
260
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
First, design no harm
axbom
PRO
2
1.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Done Done
chrislema
186
17k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
We Are The Robots
honzajavorek
0
380
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
結論: 検証の結果、人類の存 在があやまりだった。
完