I\'m working on this validation script for my latest project, and one of the requirements is that it checks if the value that the user enters is in the database, and if it i
The $.get() request is asynchronous. You will only have hasError set after the response comes in, which is a lot later than when you're checking it.
$.get()
hasError