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
170
dry-validations
Krzysztof Wawer
September 23, 2016
Tweet
Share
More Decks by Krzysztof Wawer
See All by Krzysztof Wawer
The Good Architecture
wafcio
0
620
GIT - Good Practices
wafcio
0
73
Slim Ruby on Rails: Controllers & Middlewares
wafcio
1
170
Dry System
wafcio
0
100
Validations in Ruby
wafcio
0
180
Generating a CSV file with ROM
wafcio
0
310
Trailblazer bez trailblazera
wafcio
0
220
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
170
Jak (nie) używać Service Object
wafcio
0
210
Other Decks in Programming
See All in Programming
AIコーディングAgentとの向き合い方
eycjur
0
270
Rancher と Terraform
fufuhu
2
550
Design Foundational Data Engineering Observability
sucitw
3
200
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
310
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
270
testingを眺める
matumoto
1
140
Namespace and Its Future
tagomoris
6
700
チームのテスト力を鍛える
goyoki
3
670
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
150
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
590
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
240
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Context Engineering - Making Every Token Count
addyosmani
3
54
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
It's Worth the Effort
3n
187
28k
Automating Front-end Workflow
addyosmani
1370
200k
Facilitating Awesome Meetings
lara
55
6.5k
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