Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Remove unused files

KrzysztofPajak409249c7bcac
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/validation-config.js b/src/Web/Grand.Web/wwwroot/theme/script/validation-config.js
deleted file mode 100644
index 7d32e5089..000000000
--- a/src/Web/Grand.Web/wwwroot/theme/script/validation-config.js
+++ /dev/null
@@ -1,101 +0,0 @@
-const config = {
- inject: true,
- // Important to name this something other than 'fields'
- fieldsBagName: 'veeFields',
- // This is not required but avoids possible naming conflicts
- errorBagName: 'veeErrors',
- classes: true,
- classNames: {
- valid: 'is-valid',
- invalid: 'is-invalid'
- }
-}
-Vue.use(VeeValidate, config);
-const vee = new VeeValidate(config, Vue);
-
-function vee_getMessage(field, rule) {
- var element = document.getElementsByName(field);
- if (element && element[0]) {
- var text = element[0].getAttribute('data-val-' + rule);
- if (text)
- return text;
- }
-}
-
-vee._validator.extend('required', {
- getMessage: field => {
- var text = vee_getMessage(field, 'required');
- if (text) {
- return text;
- }
- return 'The ' + field + ' field is required.'
- },
- validate: value => !!value
-});
-
-vee._validator.extend('email', {
- getMessage: field => {
- var text = vee_getMessage(field, 'email');
- if (text) {
- return text;
- }
- return 'This field must be a valid email.'
- },
- validate: value => {
- // if the field is empty
- if (!value) {
- return true;
- }
- // if the field is not a valid email
- if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value)) {
- return false;
- }
- // All is good
- return true;
- }
-});
-
-vee._validator.extend('confirmed', {
- paramNames: ['targetValue'],
- validate: function (value, ref) {
- return value === ref.targetValue;
- },
- options: {
- hasTarget: true
- },
- getMessage: field => {
- var text = vee_getMessage(field, 'password');
- if (text) {
- return text;
- }
- return 'Password confirmation does not match'
- },
-});
-
-vee._validator.extend('min', {
- getMessage: field => {
- var text = vee_getMessage(field, 'length');
- if (text) {
- return text;
- }
- return 'This ' + field + ' should have at least characters.'
- },
- options: {
- hasTarget: true
- },
- paramNames: ['targetValue'],
- validate: function (value, ref) {
- // if the field is empty
- if (!value) {
- return true;
- }
- var element = document.getElementsByName(ref.targetValue);
- var number = parseInt(element[0].getAttribute('data-val-length-min'));
- var length = value.length;
- if (length < number) {
- return false;
- }
- // All is good
- return true;
- }
-});
\ No newline at end of file
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/validation-config.min.js b/src/Web/Grand.Web/wwwroot/theme/script/validation-config.min.js
deleted file mode 100644
index c2d16f371..000000000
--- a/src/Web/Grand.Web/wwwroot/theme/script/validation-config.min.js
+++ /dev/null
@@ -1 +0,0 @@
-const config={inject:!0,fieldsBagName:"veeFields",errorBagName:"veeErrors",classes:!0,classNames:{valid:"is-valid",invalid:"is-invalid"}};Vue.use(VeeValidate,config);const vee=new VeeValidate(config,Vue);function vee_getMessage(e,a){var t=document.getElementsByName(e);if(t&&t[0]){var r=t[0].getAttribute("data-val-"+a);if(r)return r}}vee._validator.extend("required",{getMessage:e=>{var a=vee_getMessage(e,"required");return a||"The "+e+" field is required."},validate:e=>!!e}),vee._validator.extend("email",{getMessage:e=>{var a=vee_getMessage(e,"email");return a||"This field must be a valid email."},validate:e=>!e||!!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(e)}),vee._validator.extend("confirmed",{paramNames:["targetValue"],validate:function(e,a){return e===a.targetValue},options:{hasTarget:!0},getMessage:e=>{var a=vee_getMessage(e,"password");return a||"Password confirmation does not match"}}),vee._validator.extend("min",{getMessage:e=>{var a=vee_getMessage(e,"length");return a||"This "+e+" should have at least characters."},options:{hasTarget:!0},paramNames:["targetValue"],validate:function(e,a){if(!e)return!0;var t=document.getElementsByName(a.targetValue),r=parseInt(t[0].getAttribute("data-val-length-min"));return!(e.length<r)}});
\ No newline at end of file