Promise based JavaScript Validations