if (securityValidationService.hasXssPayload(encounter.getComment())) {
            fireXssEvent();
            errors.rejectValue("comment", Constants.XSS_ERROR_CODE);
        } else if (securityValidationService.hasSqlIPayload(encounter.getComment())) {
            fireSqlIEvent();