I was wondering how I can specify more than one validator for a form?
Suppose I want to have RequiredFields, plus another validator of my own, how can I add this to a form?
As far as I can see, you can only pass one validator to the Form constructor, right? It won't accept an array of Validator objects I suppose... thus making this impossible?
Also, I was wondering what the point is of returning 'true' or 'false' in the php() method of Validator/RequiredFields? - it seems to me the only thing having a result is throwing a validationError() ?
And thirdly - is it possible to add a field to a form after the form has been created? - as on validation? (so when the failed form is returned?) In other words, change the form/add a field from within the validator? I don't think so but I might be wrong... I think I'll need to change/decorate the 'beforeProcessing' of Form somehow, or have a RedirectBack that lets me add a field.