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
78
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
73
Clojure basics
cystbear
0
82
Welcome to Erlang
cystbear
0
81
Erlang/N2O KNPMeetup
cystbear
0
160
Symfony Best Practices and beyond
cystbear
1
220
DDD on example of Symfony (SymfonyCamp UA 2014)
cystbear
3
910
MongoDB KNPLabs GeekTime
cystbear
1
78
DDD in PHP, on example of Symfony
cystbear
10
4.1k
Other Decks in Programming
See All in Programming
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.2k
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Vapor Revolution
kazupon
1
160
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
120
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
Jakarta EE meets AI
ivargrimstad
0
180
RubyLSPのマルチバイト文字対応
notfounds
0
120
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.2k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
31
6.3k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building Applications with DynamoDB
mza
90
6.1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
4 Signs Your Business is Dying
shpigford
180
21k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Bash Introduction
62gerente
608
210k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
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