From f02ff62a08d844881a6fe8d76221ef90b31d7a05 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Mon, 13 Nov 2023 18:15:18 -0800 Subject: [PATCH] Install jquery-validation package --- package-lock.json | 9 +++++++++ package.json | 1 + resources/views/layouts/default.blade.php | 7 +------ webpack.mix.js | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index fccda00228..f46366d03a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "jquery-slimscroll": "^1.3.8", "jquery-ui": "^1.13.2", "jquery-ui-bundle": "^1.12.1", + "jquery-validation": "^1.20.0", "jquery.iframe-transport": "^1.0.0", "jspdf-autotable": "^3.5.30", "less": "^4.2.0", @@ -7788,6 +7789,14 @@ "resolved": "https://registry.npmjs.org/jquery-ui-bundle/-/jquery-ui-bundle-1.12.1.tgz", "integrity": "sha512-GHaOlAemudaYqrBzaU0XutgC/vBwcvd+SBQ+TtUTA+dLx4PiVQAfTm3ABrh+JzhV6PZBOk8AIhsC9l+XggpldQ==" }, + "node_modules/jquery-validation": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/jquery-validation/-/jquery-validation-1.20.0.tgz", + "integrity": "sha512-c8tg4ltIIP6L7l0bZ79sRzOJYquyjS48kQZ6iv8MJ2r0OYztxtkWYKTReZyU2/zVFYiINB29i0Z/IRNNuJQN1g==", + "peerDependencies": { + "jquery": "^1.7 || ^2.0 || ^3.1" + } + }, "node_modules/jquery.iframe-transport": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/jquery.iframe-transport/-/jquery.iframe-transport-1.0.0.tgz", diff --git a/package.json b/package.json index eb96411606..8ddf73dae3 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "jquery-slimscroll": "^1.3.8", "jquery-ui": "^1.13.2", "jquery-ui-bundle": "^1.12.1", + "jquery-validation": "^1.20.0", "jquery.iframe-transport": "^1.0.0", "jspdf-autotable": "^3.5.30", "less": "^4.2.0", diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 3fe1b3845e..74da440b10 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -965,12 +965,7 @@ $('.js-copy-link').tooltip('hide').attr('data-original-title', '{{ trans('general.copied') }}').tooltip('show'); }); - // ignore: 'input[type=hidden]' is required here to validate the select2 lists - $.validate({ - form: '#create-form', - modules: 'date, toggleDisabled', - disabledFormFilter: '#create-form', - showErrorDialogs: true, + $('#create-form').validate({ ignore: 'input[type=hidden]' }); diff --git a/webpack.mix.js b/webpack.mix.js index 9b4fbdd12a..4f931be8bd 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -154,7 +154,7 @@ mix.combine( "./resources/assets/js/extensions/pGenerator.jquery.js", "./node_modules/chart.js/dist/Chart.js", "./resources/assets/js/signature_pad.js", - //"./node_modules/jquery-form-validator/form-validator/jquery.form-validator.js", //problem? + "./node_modules/jquery-validation/dist/jquery.validate.js", "./node_modules/list.js/dist/list.js", "./node_modules/clipboard/dist/clipboard.js", ],