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
dry-validations
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Krzysztof Wawer
September 23, 2016
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
dry-validations
Krzysztof Wawer
September 23, 2016
More Decks by Krzysztof Wawer
See All by Krzysztof Wawer
The Good Architecture
wafcio
0
680
GIT - Good Practices
wafcio
0
110
Slim Ruby on Rails: Controllers & Middlewares
wafcio
1
220
Dry System
wafcio
0
130
Validations in Ruby
wafcio
0
210
Generating a CSV file with ROM
wafcio
0
380
Trailblazer bez trailblazera
wafcio
0
260
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
220
Jak (nie) używać Service Object
wafcio
0
250
Other Decks in Programming
See All in Programming
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
280
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
570
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
260
AIと壁打ちしながら進めるコスト管理
fufuhu
1
1.4k
今さら聞けない .NET CLI
htkym
0
210
React本体のコードリーディング
high_g_engineer
1
150
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
170
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
140
仕様駆動開発の消費期限
watany
20
8.8k
Hono + Inertia + React で LP を構築した話
oukayuka
2
130
テーブルをDELETEした
yuzneri
0
150
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.5k
Six Lessons from altMBA
skipperchong
29
4.5k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
380
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
620
Game over? The fight for quality and originality in the time of robots
wayneb77
1
250
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
220
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
41k
New Earth Scene 8
popppiees
3
2.5k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
630
Transcript
Krzysztof (Christopher) Wawer @wafcio about.me/kwawer
Our API • Roda • ROM (Ruby Object Mapper) •
JSON API standard (http://jsonapi.org)
{ price: 1000 } => { price: '1000' } /\d+/
dry-validation Piotr Solnica Andy Holland http://dry-rb.org/gems/dry-validation/
Community • 17 contributors • very active Gitter channel https://gitter.im/dry-rb/chat
• v0.10.1 • used in hanami-validations, reform
Strange and awesome things
Predicate Logic • and ( & ) • or (
| ) Dry::Validation.Schema do required(:age) { int? & gt?(18) } end
Optional Keys and Values { age: 30 } { name:
nil, age: 30 }
Nested data { name: "John", address: { street: "Main Street"
}, emails: ["
[email protected]
"] }
Shared schema Dry::Validation.Schema do required(:name).filled required(:address).schema(AddressSchema) end
dry-validation http://dry-rb.org/gems/dry-validation/
Thanks @wafcio about.me/kwawer