change validate.js to async-validation