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
140
dry-validations
Krzysztof Wawer
September 23, 2016
Tweet
Share
More Decks by Krzysztof Wawer
See All by Krzysztof Wawer
The Good Architecture
wafcio
0
530
GIT - Good Practices
wafcio
0
45
Slim Ruby on Rails: Controllers & Middlewares
wafcio
1
120
Dry System
wafcio
0
87
Validations in Ruby
wafcio
0
140
Generating a CSV file with ROM
wafcio
0
230
Trailblazer bez trailblazera
wafcio
0
160
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
110
Jak (nie) używać Service Object
wafcio
0
150
Other Decks in Programming
See All in Programming
AWS認定資格を受験するにあたり、気づいたこと・実践していたことのまとめ
satoshi256kbyte
1
120
DjangoNinjaで高速なAPI開発を実現する
masaya00
0
500
DevFest Android in Korea 2024 - 안드로이드의 문단속 : 앱을 지키는 암호화 이야기
mdb1217
1
150
4年間変わらなかった YOUTRUSTのアーキテクチャ
daiki1003
1
530
.NET Aspireのクラウド対応検証: Azureと他環境での実践
ymd65536
1
410
Cloud Adoption Framework にみる組織とクラウド導入戦略
tomokusaba
2
450
データサイエンスのフルサイクル開発を実現する機械学習パイプライン
xcnkx
2
500
全方位強化 Python 服務可觀測性:以 FastAPI 和 Grafana Stack 為例
blueswen
1
380
App Router 悲喜交々
quramy
7
380
Modern Functional Fluent CFML REST by Luis Majano
ortus24
0
140
5年分のツケを一気に払った話
soogie
3
1.3k
[PHPカンファレンス沖縄2024]「無理なくできるだけ安全に」テストもないレガシーコードをリファクタリングするテクニック
ikezoemakoto
3
120
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
450k
From Idea to $5000 a Month in 5 Months
shpigford
380
46k
Visualization
eitanlees
143
15k
Building a Scalable Design System with Sketch
lauravandoore
459
32k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
In The Pink: A Labor of Love
frogandcode
139
22k
Designing the Hi-DPI Web
ddemaree
279
34k
Designing on Purpose - Digital PM Summit 2013
jponch
114
6.9k
Web Components: a chance to create the future
zenorocha
310
42k
Speed Design
sergeychernyshev
22
480
Ruby is Unlike a Banana
tanoku
96
11k
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