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
ORO Meetup #4
Search
Oleg Zinchenko
February 22, 2016
Programming
0
76
ORO Meetup #4
Frontend Validation
Oleg Zinchenko
February 22, 2016
Tweet
Share
More Decks by Oleg Zinchenko
See All by Oleg Zinchenko
Keep It Simple Security (Symfony Cafe 28-01-2016)
cystbear
0
110
Erlang (GeekTalks)
cystbear
0
69
Clojure basics
cystbear
0
78
Welcome to Erlang
cystbear
0
80
Erlang/N2O KNPMeetup
cystbear
0
140
Symfony Best Practices and beyond
cystbear
1
200
DDD on example of Symfony (SymfonyCamp UA 2014)
cystbear
3
900
MongoDB KNPLabs GeekTime
cystbear
1
66
DDD in PHP, on example of Symfony
cystbear
10
4k
Other Decks in Programming
See All in Programming
PHP 8.3で追加されたjson_validate()を徹底的に深掘りしてみよう
mashirou1234
1
720
導入から5年が経って見えた Datadog APM 運用の課題
bgpat
2
540
OpenTelemetry のサービスという概念について
azukiazusa1
1
380
15分間でふんわり理解するDocker @ Matsuriba MAX
ukwhatn
PRO
1
330
BuefyのMaintainerを引き継いだ件
kikuomax
0
510
PHPerKaigi 2024〜10年以上動いているレガシーなバッチシステムを Kubernetes(Amazon EKS) に移行する取り組み〜
tshinowpub
1
220
PHP8の機能を使って堅牢にコードを書く
fendo181
6
2.6k
Parallel Socket Communication in Swift
s_shimotori
0
200
Kotlinを用いたDSL的な設計手法と使用上の注意
kohii00
3
530
ISUCONってなんだか難しそう……!!でも、初めてのISUCONにPHPで挑戦してきました!
kotomin_m
1
300
どうしてこうなった命名集 ~🔥編~ / OOC 2024 LT
pictiny
4
2.7k
デザインシステムで Tailwind CSSとCSS in JSに分散投資をしたら良かった話
fsubal
14
2.9k
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
60
6.6k
How GitHub Uses GitHub to Build GitHub
holman
467
290k
Building an army of robots
kneath
300
41k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
Building a Modern Day E-commerce SEO Strategy
aleyda
15
6.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
950
GitHub's CSS Performance
jonrohan
1023
450k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
A better future with KSS
kneath
230
16k
Web Components: a chance to create the future
zenorocha
304
41k
Transcript
None
cystbear Erlanger Symfony expert MongoDB adept OSS doer https://twitter.com/1cdecoder https://github.com/cystbear
http://trinity.ck.ua/
Frontend Validation
None
No time for REST
Validation <?php namespace AppBundle/Entity/Author; use Symfony\Component\Validator\Constraints as Assert; class Author
{ /** * @Assert\NotBlank() */ public $name; }
Twig Rendering {# app/Resources/views/default/new.html.twig #} {{ form_start(form) }} {{ form_errors(form)
}} {{ form_row(form.task) }} {{ form_row(form.dueDate) }} {{ form_end(form) }}
None
UberFrontendValidationBundle
Installation composer require sleepness/uber-frontend-validation-bundle $bundles = array( new Sleepness\UberFrontendValidationBundle\SleepnessUberFrontendValidationBundle(), );
twig: form_themes: - 'SleepnessUberFrontendValidationBundle:Form:fields.html.twig' {{ validation_init() }} jQuery
None
Result <div> <label for="advert_title" class="required">Title</label> <input type="text" id="advert_title" name="advert[title]" data-message-notblank="This
value should not be blank." data-constraint="NotBlank" /> </div>
Result-2 <div> <label for="advert_title" class="required">Title</label> <input type="url" id="advert_title" name="advert[title]" data-message-notblank="This
value should not be blank." data-message-url="This value is not a valid URL." data-constraint="NotBlank Url" /> </div>
Sleepness https://github.com/Sleepness/UberFrontendValidationBundle
Q? A!
None