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
80
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
120
Erlang (GeekTalks)
cystbear
0
74
Clojure basics
cystbear
0
82
Welcome to Erlang
cystbear
0
83
Erlang/N2O KNPMeetup
cystbear
0
160
Symfony Best Practices and beyond
cystbear
1
230
DDD on example of Symfony (SymfonyCamp UA 2014)
cystbear
3
910
MongoDB KNPLabs GeekTime
cystbear
1
79
DDD in PHP, on example of Symfony
cystbear
10
4.1k
Other Decks in Programming
See All in Programming
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
360
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
200
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.3k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
870
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
210
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
230
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
5.8k
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
230
Findy Team+ Awardを受賞したかった!ベストプラクティス応募内容をふりかえり、開発生産性向上もふりかえる / Findy Team Plus Award BestPractice and DPE Retrospective 2024
honyanya
0
130
fs2-io を試してたらバグを見つけて直した話
chencmd
0
280
為你自己學 Python
eddie
0
500
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
160
Featured
See All Featured
The Language of Interfaces
destraynor
155
24k
Scaling GitHub
holman
459
140k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
How to train your dragon (web standard)
notwaldorf
88
5.8k
The World Runs on Bad Software
bkeepers
PRO
66
11k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Practical Orchestrator
shlominoach
186
10k
KATA
mclloyd
29
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
A Tale of Four Properties
chriscoyier
157
23k
We Have a Design System, Now What?
morganepeng
51
7.3k
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