edit inline and validate field

Discussion relating to version 1.3.x and 1.4.x

edit inline and validate field

Postby darkcristal » Wed Nov 30, 2011 1:41 pm

Hello,

i have a edit inline form in ajax where I can validate each field separately.
When i submit a field i want to validate his format with his sfValidator in the form independently of other fields.

Actually i do :

$product = $product = Doctrine_Core::getTable('Product')->getProduct($request->getParameter('id'))->getFirst();
$product->set('name', 'test')
if ($product->isValid()) {
$product->save();
}

and my request is : product/edit/12?product[name]=test

My field "name" must be a string but i can write anything. I would like to validate the field (with only his sfValidator) before save.

Thx for your help and sorry for my bad english !
darkcristal
Junior Member
 
Posts: 2
Joined: Wed Nov 30, 2011 1:23 pm

Re: edit inline and validate field

Postby darkcristal » Thu Dec 01, 2011 4:27 pm

no idea ?
darkcristal
Junior Member
 
Posts: 2
Joined: Wed Nov 30, 2011 1:23 pm


Return to symfony 1.3 and 1.4

Who is online

Users browsing this forum: Bing [Bot] and 5 guests