From de90ff63a8192b47d8963a86d04523713a4b76eb Mon Sep 17 00:00:00 2001 From: Ilya Date: Thu, 21 Feb 2019 08:31:51 +0200 Subject: [PATCH] removed symbols "\", "/", " ", ":" from restrictions (#199) --- .../Services/Validation/ProductValidator.cs | 2 +- .../Localizations/en.VirtoCommerce.Catalog.json | 10 +++++----- .../Scripts/blades/category-detail.js | 4 ++-- .../Scripts/blades/item-detail.js | 4 ++-- .../Scripts/wizards/newCategory/category-wizard.js | 4 ++-- .../Scripts/wizards/newProduct/new-product-wizard.js | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/VirtoCommerce.CatalogModule.Data/Services/Validation/ProductValidator.cs b/VirtoCommerce.CatalogModule.Data/Services/Validation/ProductValidator.cs index e652e5afe..f521a44a7 100644 --- a/VirtoCommerce.CatalogModule.Data/Services/Validation/ProductValidator.cs +++ b/VirtoCommerce.CatalogModule.Data/Services/Validation/ProductValidator.cs @@ -5,7 +5,7 @@ namespace VirtoCommerce.CatalogModule.Data.Services.Validation { public class ProductValidator : AbstractValidator { - private static readonly char[] _illegalCodeChars = { '$', '+', ';', '=', '%', '{', '}', '[', ']', '|', '\\', '/', '@', '~', '!', '^', '*', '&', '(', ')', ':', '<', '>' }; + private static readonly char[] _illegalCodeChars = { '$', '+', ';', '=', '%', '{', '}', '[', ']', '|', '@', '~', '!', '^', '*', '&', '(', ')', '<', '>' }; public ProductValidator() { diff --git a/VirtoCommerce.CatalogModule.Web/Localizations/en.VirtoCommerce.Catalog.json b/VirtoCommerce.CatalogModule.Web/Localizations/en.VirtoCommerce.Catalog.json index c08a556dc..d6c6412bb 100644 --- a/VirtoCommerce.CatalogModule.Web/Localizations/en.VirtoCommerce.Catalog.json +++ b/VirtoCommerce.CatalogModule.Web/Localizations/en.VirtoCommerce.Catalog.json @@ -96,7 +96,7 @@ "priority": "Priority" }, "validations": { - "code": "Code can't contain $+;=%{}[]|/@ ~!^*&()?:'<>, characters" + "code": "Code can't contain $+;=%{}[]|@~!^*&()?'<>, characters" }, "placeholders": { "name": "Enter category name", @@ -297,7 +297,7 @@ "end-date": "Listing expires on" }, "validations": { - "sku": "SKU can't contain $+;=%{}[]|/@ ~!^*&()?:'<>, characters" + "sku": "SKU can't contain $+;=%{}[]|@~!^*&()?'<>, characters" }, "placeholders": { "sku": "Enter item SKU", @@ -609,7 +609,7 @@ "code": "Code" }, "validations": { - "code": "Code can't contain $+;=%{}[]|\/@ ~!^*&()?:'<>, characters" + "code": "Code can't contain $+;=%{}[]|@~!^*&()?'<>, characters" }, "placeholders": { "name": "Enter category name", @@ -633,7 +633,7 @@ "seo-information-summary-undefined": "Seo information undefined" }, "validations": { - "sku": "SKU can't contain $+;=%{}[]|\/@ ~!^*&()?:'<>, characters", + "sku": "SKU can't contain $+;=%{}[]|@~!^*&()?'<>, characters", "sku-required": "Required", "name-required": "Required" }, @@ -654,7 +654,7 @@ "upload-images-summary": "{{ count }} image(s) uploaded" }, "validations": { - "sku": "SKU can't contain $+;=%{}[]|\/@ ~!^*&()?:'<>, characters", + "sku": "SKU can't contain $+;=%{}[]|@~!^*&()?'<>, characters", "sku-required": "Required", "name-required": "Required" }, diff --git a/VirtoCommerce.CatalogModule.Web/Scripts/blades/category-detail.js b/VirtoCommerce.CatalogModule.Web/Scripts/blades/category-detail.js index 9ef8be843..17983bca4 100644 --- a/VirtoCommerce.CatalogModule.Web/Scripts/blades/category-detail.js +++ b/VirtoCommerce.CatalogModule.Web/Scripts/blades/category-detail.js @@ -1,4 +1,4 @@ -angular.module('virtoCommerce.catalogModule') +angular.module('virtoCommerce.catalogModule') .controller('virtoCommerce.catalogModule.categoryDetailController', ['$rootScope', '$scope', 'platformWebApp.bladeNavigationService', 'platformWebApp.settings', 'virtoCommerce.catalogModule.categories', 'virtoCommerce.catalogModule.catalogs', 'platformWebApp.metaFormsService', function ($rootScope, $scope, bladeNavigationService, settings, categories, catalogs, metaFormsService) { var blade = $scope.blade; blade.updatePermission = 'catalog:update'; @@ -38,7 +38,7 @@ }; blade.codeValidator = function (value) { - var pattern = /[$+;=%{}[\]|\\\/@ ~!^*&()?:'<>,]/; + var pattern = /[$+;=%{}[\]|@~!^*&()?'<>,]/; return !pattern.test(value); }; diff --git a/VirtoCommerce.CatalogModule.Web/Scripts/blades/item-detail.js b/VirtoCommerce.CatalogModule.Web/Scripts/blades/item-detail.js index 18e8f2da6..b6bfa4cd7 100644 --- a/VirtoCommerce.CatalogModule.Web/Scripts/blades/item-detail.js +++ b/VirtoCommerce.CatalogModule.Web/Scripts/blades/item-detail.js @@ -1,4 +1,4 @@ -angular.module('virtoCommerce.catalogModule') +angular.module('virtoCommerce.catalogModule') .controller('virtoCommerce.catalogModule.itemDetailController', ['$rootScope', '$scope', 'platformWebApp.bladeNavigationService', 'platformWebApp.settings', 'virtoCommerce.catalogModule.items', 'virtoCommerce.customerModule.members', 'virtoCommerce.catalogModule.catalogs', 'platformWebApp.metaFormsService', 'virtoCommerce.catalogModule.categories', function ($rootScope, $scope, bladeNavigationService, settings, items, members, catalogs, metaFormsService, categories) { var blade = $scope.blade; blade.updatePermission = 'catalog:update'; @@ -46,7 +46,7 @@ blade.codeValidator = function (value) { - var pattern = /[$+;=%{}[\]|\\\/@ ~!^*&()?:'<>,]/; + var pattern = /[$+;=%{}[\]|@~!^*&()?'<>,]/; return !pattern.test(value); }; diff --git a/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newCategory/category-wizard.js b/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newCategory/category-wizard.js index d9b100c48..b145e1caa 100644 --- a/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newCategory/category-wizard.js +++ b/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newCategory/category-wizard.js @@ -1,4 +1,4 @@ -angular.module('virtoCommerce.catalogModule') +angular.module('virtoCommerce.catalogModule') .controller('virtoCommerce.catalogModule.newCategoryWizardController', ['$scope', 'platformWebApp.bladeNavigationService', 'platformWebApp.dialogService', 'virtoCommerce.catalogModule.categories', function ($scope, bladeNavigationService, dialogService, categories) { var blade = $scope.blade; @@ -46,7 +46,7 @@ } $scope.codeValidator = function (value) { - var pattern = /[$+;=%{}[\]|\\\/@ ~!^*&()?:'<>,]/; + var pattern = /[$+;=%{}[\]|@~!^*&()?'<>,]/; return !pattern.test(value); }; diff --git a/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newProduct/new-product-wizard.js b/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newProduct/new-product-wizard.js index 506745db5..d35273482 100644 --- a/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newProduct/new-product-wizard.js +++ b/VirtoCommerce.CatalogModule.Web/Scripts/wizards/newProduct/new-product-wizard.js @@ -1,4 +1,4 @@ -angular.module('virtoCommerce.catalogModule') +angular.module('virtoCommerce.catalogModule') .controller('virtoCommerce.catalogModule.newProductWizardController', ['$scope', 'platformWebApp.bladeNavigationService', '$http', 'virtoCommerce.storeModule.stores', 'virtoCommerce.catalogModule.catalogImagesFolderPathHelper', function ($scope, bladeNavigationService, $http, stores, catalogImgHelper) { var blade = $scope.blade; blade.headIcon = blade.item.productType === 'Digital' ? 'fa fa-file-archive-o' : 'fa fa-truck'; @@ -92,7 +92,7 @@ } $scope.codeValidator = function (value) { - var pattern = /[$+;=%{}[\]|\\\/@ ~!^*&()?:'<>,]/; + var pattern = /[$+;=%{}[\]|@~!^*&()?'<>,]/; return !pattern.test(value); };