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
550
GIT - Good Practices
wafcio
0
49
Slim Ruby on Rails: Controllers & Middlewares
wafcio
1
130
Dry System
wafcio
0
89
Validations in Ruby
wafcio
0
150
Generating a CSV file with ROM
wafcio
0
250
Trailblazer bez trailblazera
wafcio
0
180
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
120
Jak (nie) używać Service Object
wafcio
0
160
Other Decks in Programming
See All in Programming
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
Criando Commits Incríveis no Git
marcelgsantos
2
170
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
660
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
Go の GC の不得意な部分を克服したい
taiyow
2
760
Discord Bot with AI -for English learners-
xin9le
1
120
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
740
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
A designer walks into a library…
pauljervisheath
204
24k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
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