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
83
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
130
Erlang (GeekTalks)
cystbear
0
77
Clojure basics
cystbear
0
86
Welcome to Erlang
cystbear
0
93
Erlang/N2O KNPMeetup
cystbear
0
160
Symfony Best Practices and beyond
cystbear
1
240
DDD on example of Symfony (SymfonyCamp UA 2014)
cystbear
3
920
MongoDB KNPLabs GeekTime
cystbear
1
85
DDD in PHP, on example of Symfony
cystbear
10
4.4k
Other Decks in Programming
See All in Programming
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
What's new in Spring Modulith?
olivergierke
1
180
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
480
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
450
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
360
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
880
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
120
iOSでSVG画像を扱う
kishikawakatsumi
0
170
NIKKEI Tech Talk#38
cipepser
0
310
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.2k
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
How to Ace a Technical Interview
jacobian
280
24k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Designing for Performance
lara
610
69k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Bash Introduction
62gerente
615
210k
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