def user_create_onvalidation(form):
 if (form.request_vars.has_key('password_two') and (form.request_vars.password != form.request_vars.password_two)):
  form.errors.password = T("Password fields don't match")
 return True

def user_create_onvalidation ( form ) : if ( form . request_vars . has_key ( 'password_two' ) and ( form . request_vars . password != form . request_vars . password_two ) ) : form . errors . password = T ( "Password fields don't match" ) return True
server-side check that password confirmation field is valid .