Padrino::Validation::HTML5
by @aereal (?:id:aereal)
1111݄13༵
Slide 2
Slide 2 text
Who am I?
@aereal
?:id:aereal
GitHub: aereal
1111݄13༵
Slide 3
Slide 3 text
Activities
make kaminari.gem independent Rails/Railities
Padrino document translation
1111݄13༵
Slide 4
Slide 4 text
Web App in Ruby World
http://padrinorb.com/
http://jp.padrinorb.com/ (ja)
1111݄13༵
Slide 5
Slide 5 text
Padrino is ...
the godfather of sinatra
https://github.com/padrino/padrino-framework#readme
1111݄13༵
Slide 6
Slide 6 text
Validation with
1111݄13༵
Slide 7
Slide 7 text
Write Validations
In View (HTML5)
In Model
1111݄13༵
Slide 8
Slide 8 text
DRY =
Don’t Repeat
Yourself
1111݄13༵
Slide 9
Slide 9 text
ActiveModel::Validations
Acceptance
Confirmation
Inclusion/Exclusion
Format (Numericality)
Length
Presence
1111݄13༵
Slide 10
Slide 10 text
P::H::FB
P = Padrino
H = Helpers
FB = FormBuilders
1111݄13༵
Slide 11
Slide 11 text
P::H::FB
1111݄13༵
Slide 12
Slide 12 text
P::V::H5
P = Padrino
V = Validation
H5 = HTML5
1111݄13༵
Slide 13
Slide 13 text
P::V::H5
Validations and their options from ActiveModel
injects HTML5 form validations
i.e. PresenceValidation -> input[required=required]
1111݄13༵
Slide 14
Slide 14 text
See Also
http://padrinorb.com/
http://jp.padrinorb.com/ (Translators welcome!)
http://git.io/padrino-v-h5
https://github.com/kentaro/HTML-ValidationRules
1111݄13༵