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
Krzysztof Wawer
September 23, 2016
Programming
0
190
dry-validations
Krzysztof Wawer
September 23, 2016
Tweet
Share
More Decks by Krzysztof Wawer
See All by Krzysztof Wawer
The Good Architecture
wafcio
0
650
GIT - Good Practices
wafcio
0
94
Slim Ruby on Rails: Controllers & Middlewares
wafcio
1
200
Dry System
wafcio
0
120
Validations in Ruby
wafcio
0
200
Generating a CSV file with ROM
wafcio
0
350
Trailblazer bez trailblazera
wafcio
0
240
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
200
Jak (nie) używać Service Object
wafcio
0
230
Other Decks in Programming
See All in Programming
atmaCup #23でAIコーディングを活用した話
ml_bear
4
720
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.2k
CSC307 Lecture 10
javiergs
PRO
1
690
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
140
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
380
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
120
AI活用のコスパを最大化する方法
ochtum
0
120
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
150
あなたはユーザーではない #PdENight
kajitack
4
290
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
380
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building AI with AI
inesmontani
PRO
1
760
Side Projects
sachag
455
43k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
110
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
Mind Mapping
helmedeiros
PRO
1
110
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
280
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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