Hi group,
How do I enforce some simple validation for passwords matching on a form in
a controller? All I want to do is to check the second password is the same
as the first one, and here is some code I've come up so far:
form = SQLFORM.factory(
Field('email', requires=IS_NOT_EMPTY()),
Field('pwd', requires=[IS_NOT_EMPTY(), IS_STRONG(min=6, special=0, upper=1
), CRYPT()]),
Field('re_pwd', requires=IS_MATCH(???)))
I am attempting to use the validator 'IS_MATCH()' for the second password,
but not sure how I reference the the input in the first password field of
the same form. Any suggestion would be welcome. Thanks.