I am using Symfony 1.3.2 with Propel ORM on Ubuntu 9.10.
I am writing a registration form, which requires a user to provide a user name.
I want to impose the following restrictions on the choice of names:
- That the name is unique (i.e. is not already in use by someone else
- The name is not in a list of offensive names, stored in a database table
For the first requirement, it is easily done by using the sfValidatorPropelUnique validator.
The challenge however lies in implementing the second requirement AND COMBINING requirement 1 and 2 into a single validator.
I suppose I could write a custom validator to do this, but I am wondering is there a better way to do this (i.e. using the framework, and not "rolling my own" solution ?