From: Christian Weiske on
Hi all,


I have a "you forgot your password" form containing:
- Username field
- Email field
- Captcha
- Submit button

Both username and email input elements have several rules attached that
validate the respective values.

Now I want to create a rule that validates that the username-email
combination really exists.
At first, I added a form rule callback so I get all form value passed.
There I can validate username and email myself. The problem I am facing
is that the rule gets called even if the fields themselves are not
valid. That means I have to do validation of username and email values
in my form rule callback method; something that doubles much code.

Is there a solution to that problem?
Can I get the form rule called only when the fields are valid?

--
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-