Zend Framework Forum

Go Back   Zend Framework Forum > Zend Framework Components > Core Infrastructure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-2009, 12:40 PM
Junior Member
 
Join Date: Jan 2009
Posts: 10
Default Zend_Form custom validation

Hi,
I need to have custom validation for a form. For example one field can be required or not depending on the values from other fields. Should I develop custom validators - but to be somehow connected to more field - or override is "isValid" form function?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-29-2009, 03:29 PM
Senior Member
 
Join Date: Sep 2008
Location: Croatia
Posts: 345
Send a message via MSN to Eugen
Default

make your own validator and pass to him fields you need..
dont hardcore that thing into validator class because its not reusable then and you will be breaking oop paterns

this will get you started Custom validators for Zend_Form_Element Christer’s blog o’ fun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT. The time now is 01:06 AM.


Designed by: Miner Skinz Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0