Talk in English - US at php[tek] 2018
View Slides: https://docs.google.com/presentation/d/1pNUiwrqZLBGi5HuNj7dtaxO5eY2Jk9JuL8fL8Z3kFrk/edit?usp=sharing
Checkout the code: https://github.com/bgamrat/validation
Short URL: https://joind.in/talk/fbb2d (QR-Code (opens in new window))
Client-side validation helps users and reduces invalid submissions to the server. Server-side validation protects the users, the application, and the server. Server-side validation is a must, but if you want to use client-side validation, how can you sync the validation constraints?
We'll begin by discussing the differences between client and server-side validation; then, we'll cover how you can synchronize the validation between the client and server to help users and ensure valid data is sent to the server. The first approach will demonstrate the use of straight PHP, using an .ini file as the source for the validation constraints. The next method will use it with Symfony form field attributes and finally synchronized validation with Doctrine ORM annotations will be demonstrated.
Comments are closed.
Good explanations and examples.
Neat idea. Sort of a Naked Objects pattern with HTML 5 form validation constraints as the generated UI. Good pacing and delivery for the talk.