Wednesday, August 25, 2010

Custom Form Validators in Zend Framework

This problem got me for a few hours the other day and google was barely helpful.  So I thought I'd share this.

When you write a custom validator, you have to tell the form object where to look.  I was unable to find a way for the autoloader to find it (please correct me if there is!).  I'm not a fan of this syntax because I don't like burying and hard coding path information this deep into the code, especially with a framework as configurable as Zend.