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
520
GIT - Good Practices
wafcio
0
45
Slim Ruby on Rails: Controllers & Middlewares
wafcio
1
120
Dry System
wafcio
0
85
Validations in Ruby
wafcio
0
120
Generating a CSV file with ROM
wafcio
0
220
Trailblazer bez trailblazera
wafcio
0
150
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
110
Jak (nie) używać Service Object
wafcio
0
140
Other Decks in Programming
See All in Programming
はしめてのプログラミングとロボット制御
watawatavoltage
0
290
さきがけから振り返るアーキテクチャ刷新 / Reflecting on the Architectural Renewal from the Vanguard
nrslib
2
770
Terraformテスト入門
msato
0
530
Rust.Nagoya #1
codemountains
0
170
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
みんなのオブザーバビリティプラットフォームを作ってるんだがパフォーマンスがやばい #mackerelio #srenext
ne_sachirou
0
370
APIのない大学ログインWebサービスをWKWebViewとJavaScriptでアプリ化した話
akidon0000
1
330
最古の関数型言語「Lisp」ことはじめ / lisp_in_kamiyama
uhooi
1
190
リハビリmruby
kishima
1
160
AWSでゲームサーバーを運用! Amazon GameLiftのお話
iriikeita
0
200
AWS CDKにおける「再利用性」を考える / aws-cdk-reusability
gotok365
6
1.3k
12年前の『型システム入門』翻訳の思い出話
mame
11
1.2k
Featured
See All Featured
The Mythical Team-Month
searls
217
43k
Creatively Recalculating Your Daily Design Routine
revolveconf
214
11k
Facilitating Awesome Meetings
lara
46
5.8k
How to train your dragon (web standard)
notwaldorf
79
5.5k
Writing Fast Ruby
sferik
623
60k
Large-scale JavaScript Application Architecture
addyosmani
506
110k
Infographics Made Easy
chrislema
238
18k
Stop Working from a Prison Cell
hatefulcrawdad
266
20k
Design by the Numbers
sachag
277
18k
How to Ace a Technical Interview
jacobian
274
23k
Designing for Performance
lara
604
67k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
34
1.9k
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