Patrick Lewis a écrit :

Can you post the relevant part of ExistingUserFields for your option1
and option2 widgets? It wouldn't hurt to see the new code in
ExistingUserSchema as well.
Sure...

class ExistingUserFields(widgets.WidgetsList):

    user_name = FakeInputWidget('user_name',
                    label="User Name" )

    email = widgets.TextField('email',
                    label="Email",
help_text="Your email address (this will be validated).")

    old_password = widgets.PasswordField('old_password',
                   label="Current password",
                   help_text="The current (old) password.")

    password_1 = widgets.PasswordField('password1',
                    label="New Password",
help_text="Your new password. (If you would like to change it).")

    password_2 = widgets.PasswordField('password2',
                    label="New Password (again)",
help_text="New password again (should match the input above).")

    option1 = widgets.TextField('nom')
    option2 = widgets.TextField('prenom')


class ExistingUserSchema(validators.Schema):
    email = validators.Email(not_empty=True, max=EMAIL_ADDRESS_LENGTH)
    old_password = validators.All(validators.UnicodeString(max=40),
                                    ValidPassword())
    password1 = validators.UnicodeString(max=40)
    password2 = validators.UnicodeString(max=40)
    option1 = validators.UnicodeString(not_empty=True, max=40)
    option2 = validators.UnicodeString(not_empty=True, max=40)
    chained_validators = [validators.FieldsMatch('password1', 'password2')]

What also suprises me is that I added the same parameters to the create function and I get no errors when I create a new user !?!


>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to