View Single Post
  #3 (permalink)  
Old 03-18-2008, 03:05 AM
kmg kmg is offline
Junior Member
 
Join Date: Mar 2008
Posts: 9
Default

3. Write up a validator! As far as I know there isn't a validator that deals with model interaction at all so far, though I'm positive the idea is out there, and there might even be a couple classes put together already. I'm probably going to write one later tonight, because I was trying to figure out this problem yesterday (actually it was checking against a table to see if an email address is unique). The validator will probably take a model instance and a function name is it's parameters, and then pass the value of the field into the member function of the model instance. For your problem, it would have to take an array of values... I submit we should be able to add validators to the form itself! But then that's not really the point I guess.

Hey, sorry this post was so long, a lot of it you probably didn't even want to hear, but I've been meaning to write up some stuff about Zend_Form for a while now.
Reply With Quote