Hi,

I'm trying to get my head around the form framework in Symfony 1.4.
I've read the incredibly detailed section in the 'More with symfony'
book, but I'm still a but unsure how to implement a simple 'Change
password' functionality.

The requirements are pretty basic,

 1. There'll be two fields, `new_password`, and
`confirm_new_password`. Both will be input fields.
 2. The `new_password` field will be validated to be a string between
6 and 30 characters containing both letters and numbers.
 3. The `confirm_new_password` field will be validated to match the
`new_password` field exactly.

Now, presently I implemented this by,

 - Adding 2 new fields to my form.
 - Adding a string validator to the `new_password` field to check the
string length.
 - Adding a string validator to the `confirm_new_password` field to
make sure it was filled in.
 - And then validating the new password is valid and matches the
confirm password in a custom post validator. I did this because I
didn't want to validate the `confirm_new_password` field until the
`new_password` field was valid.

Now to the point of my question. After reading the article mentioned
above, I'm starting to think I should contain the two fields in either
a single widget or in a sub form as they rely upon each other heavily,
and one is useless without the other.

I was wondering what peoples thoughts were on this, and if someone had
implemented one, how they did it?

Thanks

Note: There is no `current_password` field as this is for my admin
area.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.

Reply via email to