August 29, 2015 in Technical Problems
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?
This topic is now archived and is closed to further replies.
Started July 31
Started 2 hours ago
Started 21 hours ago