Jump to content

Register Form validating values three times?


Recommended Posts

I am working on a modification to my board that will ping an external API with two values (a username and verification token) which are provided by the user during registration. If these values are correct, the external API returns "1" and then refuses to accept the verification token again, returning "0" on any future attempts to use the same token. If the values are incorrect, the external API also returns "0". I have added custom validation code to handle this.

I am running into a problem where submitting the Register form runs the validation code three times. The first time, the external API gives a "1" - which means that the registration should move forward as expected. Instead, the validation runs two more times, and as the token now returns a 0, it interrupts the registration process and displays the error as through the token was entered incorrectly in the first place.

Is there a way that I can prevent the validation code from running three times in a single submission?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...