I have the following deferred validator:
@colander.deferred
def deferred_password_validator(node, kw):
    password = kw.get('password')
    re_password = kw.get('re_password')
    if password != re_password:
        raise colander.Invalid(node, 'Password did not match confirm')

Then I try to capture the exception:
try:
  form.validate(....)
except ValidationFailure, e:
  error_dict = e.error.asdict()


However when the program runs, it just breaks into terminal, showing:
Invalid: {'re_password': 'Password did not match confirm'}

Can anybody help me to see where is the problem?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to