Build-in symfony form validation is really great feature. Using Propel or Doctrine ORM we have simple validation by default which we can modify in simple way.
But sometimes we want something more than server side validation (later in post SSV) and then we can easliy use javascript. Client side validation (CSV) is nice and useful but we need to remember that it could be easily switched off. So SSV is always required.
Let’s begin.
I’m not going to build a whole application. I just want to show you how to create simple contact form, validate it using SSV and CSV (with jQuery) and save it.
First of all we need to create new symfony app. If we have symfony already installed on our PC, we can just create new project directory, for example sfSimpleApp and then call:
<?php
symfomy generate:project sfSimpleApp
?>
Remember that you need to write symfony tasks in command line (on windows -cmd prompt).
As it is a simple example we are not going to configure a web server.
Continue reading ‘Symfony 1.2 - using sfForm with jquery validate plugin’
Najświeższe komentarze