Ajaxify Your Zend_Form Validation with jQuery

Jon Leben­sold posts an update to his excel­lent screen­cast; We’re going to take what was put together in the last 3 videos and now include some server-side val­i­da­tion that will appear asyn­chro­nously. This is an exam­ple of using Zend_Form as a val­i­da­tion tool via JSON.

Grab a copy of the project or browse the repos­i­tory.

UPDATE: as a cou­ple peo­ple have men­tioned, you can cut down your Index­Con­troller even more by using the Zend_Json view helper:

public function validateformAction()
{
$f = new Form_Registration();
$f->isValid($this->_getAllParams());
$this->_helper->json($f->getMessages());
}

Enjoy!

See it at Zend­casts.

Tags: , , ,

Leave a Comment

*

Get Adobe Flash playerPlugin by wpburn.com wordpress themes