Hi again,

I have a single form for users, which is both used for registration and
update. When a user is registered, I instantiate the form and clear the
elements 'status' and 'group' which I only need for updates. So far so good.

Now I have an input filter class as well. I want to have one both for
registration and updates like the form. For registration I set the
'status' and 'group' to not required, for updates I set the 'password'
to not required. Not I have the problem with the email adress which
should be unique. For registration I use the Db\NoRecordExists
validator, for updates I need to exclude the current email on the fly.

Does anyone think it is bad practice to use the same form and input
filter for different purposes? Should I rather create one form and one
input filter for each purpose and risk some code duplication?

Any thoughts would be welcome.

Regards,

Ralf

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to