Captcha required message on login/register
This commit is contained in:
parent
2c8eadb9ef
commit
7f8da7095c
@ -16,8 +16,14 @@ const handleSubmit = async (path, body) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const error = json.errors ? Object.values(json.errors)[0]._errors[0].message : json.message;
|
||||
// Very fun error message here lol
|
||||
const error =
|
||||
json.errors
|
||||
? Object.values(json.errors)[0]._errors[0].message
|
||||
: (
|
||||
json.captcha_key ? "Captcha required" : json.message
|
||||
);
|
||||
|
||||
failureMessage.innerHTML = error;
|
||||
failureMessage.style.display = "block";
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user