validations + error messages for failed ajax