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
83
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
920
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
SwiftUI Viewの責務分離
elmetal
PRO
1
240
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
750
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.3k
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
270
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
ソフトウェアエンジニアの成長
masuda220
PRO
11
1.7k
ARA Ansible for the teams
kksat
0
150
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
370
Domain-Driven Transformation
hschwentner
2
1.9k
GoとPHPのインターフェイスの違い
shimabox
2
190
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
A designer walks into a library…
pauljervisheath
205
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Done Done
chrislema
182
16k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing Experiences People Love
moore
140
23k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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