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
540
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
240
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
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.7k
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
Macとオーディオ再生 2024/11/02
yusukeito
0
190
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
580
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
550
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
130
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
Server Driven Compose With Firebase
skydoves
0
400
Honoの来た道とこれから
yusukebe
19
3k
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
現場で役立つモデリング 超入門
masuda220
PRO
13
2.9k
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Practical Orchestrator
shlominoach
186
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Rails Girls Zürich Keynote
gr2m
93
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
4 Signs Your Business is Dying
shpigford
180
21k
Building an army of robots
kneath
302
42k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
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