BUG: Regex .test returns different values when logged in console to the rest of code

My fix that I came up with that took me far too long to come up with was just this:

$w('#url').onChange(() => {$w('#url').onCustomValidation((value, reject) => {
 let result1 = description.test(value);
 let result2 = description.test(value);
 if (result1 || result2) {
            console.log("Success!!");
        } else {
            reject("Please enter a valid url");
            console.log("Please enter a valid url");
            }
    })});

So I record it twice and if either is positive then its a success.
This works because both will fail if they dont match the RegExp.