From 2a6acabe5d53ba01073f8471c56f95ac31087bd3 Mon Sep 17 00:00:00 2001 From: cnenning Date: Thu, 28 Jan 2016 10:58:44 +0100 Subject: [PATCH] updated comments --- .../src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp index c32780217..f30403f23 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp @@ -63,7 +63,7 @@ *******************************************************************/ /** - * Validates given form per AJAX. To be called as onSubmit handler. + * Validates form per AJAX. To be called as onSubmit handler. * * @param event onSubmit event */ @@ -141,7 +141,6 @@ function _removeValidationErrors() { * * @param form Form containing errors. * @param errors Errors from server. - * @returns {Boolean} True if form can be submitted. */ function _handleValidationResult(form, errors) { // action errors @@ -150,7 +149,7 @@ function _handleValidationResult(form, errors) { var errorContainer = $('ul.errorMessage'); $.each(errors.errors, function(index, errorMsg) { var li = $('
  • '); - li.text(errorMsg); + li.text(errorMsg); // use text() for security reasons errorContainer.append(li); }); } @@ -161,7 +160,7 @@ function _handleValidationResult(form, errors) { var td = $('td[data-error-for-fieldname="' + fieldName + '"]'); if (td) { var div = $('
    '); - div.text(errorMsg); + div.text(errorMsg); // use text() for security reasons td.append(div); } });