I know that in general the goal should be to avoid async: false. However, in this situation, I want to understand whether it's worth tying things together to make it work, or if it is okay:
On my site's registration page, I have a JS/jQuery validation function on submission. It has two AJAX queries, one for the username (to make sure it hasn't already been taken), and one for the email (to make sure they didn't submit an email already claimed by another user). In the validation function, I check each of these, along with lots of other things (passwords matching, check not blank, etc.), and when either of these pop up, a warning message states the issue.
Both of these ajax queries use async: false in order to ensure that the form doesn't submit before they are checked.
My question is,
how bad is this? And if it's bad bad, then why? I could put the work in to make a single function that checks both and has 4 return values for each of the different options, but that seems like a lot... I know this may not be a solid coding question, but I'm new to coding and want to make sure I understand what the difference here means.
Thanks so much in advance.