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
630
GIT - Good Practices
wafcio
0
75
Slim Ruby on Rails: Controllers & Middlewares
wafcio
1
180
Dry System
wafcio
0
110
Validations in Ruby
wafcio
0
190
Generating a CSV file with ROM
wafcio
0
320
Trailblazer bez trailblazera
wafcio
0
220
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
180
Jak (nie) używać Service Object
wafcio
0
210
Other Decks in Programming
See All in Programming
品質ワークショップをやってみた
nealle
0
100
[Kaigi on Rais 2025] 全問正解率3%: RubyKaigiで出題したやりがちな危険コード5選
power3812
0
140
dynamic!
moro
10
7.9k
Leading Effective Engineering Teams in the AI Era
addyosmani
4
390
株式会社 Sun terras カンパニーデック
sunterras
0
310
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
250
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
440
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
320
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
1.3k
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
2
380
CSC509 Lecture 06
javiergs
PRO
0
260
XP, Testing and ninja testing ZOZ5
m_seki
3
650
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
4
390
How to train your dragon (web standard)
notwaldorf
97
6.3k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
Embracing the Ebb and Flow
colly
88
4.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
35
6.1k
Rails Girls Zürich Keynote
gr2m
95
14k
How to Think Like a Performance Engineer
csswizardry
27
2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
A Tale of Four Properties
chriscoyier
161
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
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