symfony “not” Validator

One of the projects that I’m currently working on for a client is being built in symfony, the PHP5 framework. I am working in version 1.1 of the framework, which has a new Forms handling system that uses the concept of widgets and validators to handle interacting with most form elements. I had a need to ensure that certain fields did not contain certain values. Although this could be done with the regular expression validator that comes bundled with symfony (sfValidatorRegex), I decided to write my own validator specifically for this purpose. (more…)