diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php
index 034b04b6a757d..cfb54c3aefd0f 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php
@@ -29,12 +29,12 @@
],
],
'renderer_attribute_with_invalid_value' => [
- '
diff --git a/app/code/Magento/Catalog/etc/product_options.xsd b/app/code/Magento/Catalog/etc/product_options.xsd
index 3bc24a9099262..734c8f378d5d7 100644
--- a/app/code/Magento/Catalog/etc/product_options.xsd
+++ b/app/code/Magento/Catalog/etc/product_options.xsd
@@ -61,11 +61,11 @@
- Model name can contain only [a-zA-Z_\\].
+ Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
-
+
diff --git a/app/code/Magento/Catalog/etc/product_types_base.xsd b/app/code/Magento/Catalog/etc/product_types_base.xsd
index 6cc35fd7bee37..dec952bcf492e 100644
--- a/app/code/Magento/Catalog/etc/product_types_base.xsd
+++ b/app/code/Magento/Catalog/etc/product_types_base.xsd
@@ -92,11 +92,11 @@
- Model name can contain only [a-zA-Z_\\].
+ Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
-
+
diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php
index 288a99770974a..179f3f3cadab0 100644
--- a/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php
+++ b/app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/_files/invalidExportXmlArray.php
@@ -22,15 +22,15 @@
'attributes_with_type_modelName_and_invalid_value' => [
''
- . ' ',
+ . ' ',
[
"Element 'entityType', attribute 'model': [facet 'pattern'] The value '1' is not accepted by the " .
- "pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
+ "pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entityType', attribute 'model': '1' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n",
- "Element 'fileFormat', attribute 'model': [facet 'pattern'] The value 'model1' is not " .
- "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
- "Element 'fileFormat', attribute 'model': 'model1' is not a valid " .
+ "Element 'fileFormat', attribute 'model': [facet 'pattern'] The value '1model' is not " .
+ "accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
+ "Element 'fileFormat', attribute 'model': '1model' is not a valid " .
"value of the atomic type 'modelName'.\nLine: 1\n"
],
],
diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php
index 357b35e8a313c..409c1af9cb38a 100644
--- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php
+++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportMergedXmlArray.php
@@ -26,12 +26,12 @@
["Element 'entity', attribute 'notallowed': The attribute 'notallowed' is not allowed.\nLine: 1\n"],
],
'entity_model_with_invalid_value' => [
- '',
[
- "Element 'entity', attribute 'model': [facet 'pattern'] The value 'afwer34' is not " .
- "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
- "Element 'entity', attribute 'model': 'afwer34' is not a valid value of the atomic type" .
+ "Element 'entity', attribute 'model': [facet 'pattern'] The value '34afwer' is not " .
+ "accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
+ "Element 'entity', attribute 'model': '34afwer' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
],
@@ -40,7 +40,7 @@
'',
[
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '666' is not accepted by " .
- "the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
+ "the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'behaviorModel': '666' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php
index c913b53e8b531..c7b06a8731f02 100644
--- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php
+++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/_files/invalidImportXmlArray.php
@@ -19,7 +19,7 @@
'',
[
"Element 'entity', attribute 'model': [facet 'pattern'] The value '12345' is not accepted by " .
- "the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
+ "the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'model': '12345' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
@@ -28,7 +28,7 @@
'',
[
"Element 'entity', attribute 'behaviorModel': [facet 'pattern'] The value '=--09' is not " .
- "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
+ "accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
"Element 'entity', attribute 'behaviorModel': '=--09' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
@@ -46,11 +46,11 @@
["Element 'entityType': The attribute 'model' is required but missing.\nLine: 1\n"],
],
'entitytype_with_invalid_model_attribute_value' => [
- '',
+ '',
[
- "Element 'entityType', attribute 'model': [facet 'pattern'] The value 'test1' is not " .
- "accepted by the pattern '[A-Za-z_\\\\]+'.\nLine: 1\n",
- "Element 'entityType', attribute 'model': 'test1' is not a valid value of the atomic type" .
+ "Element 'entityType', attribute 'model': [facet 'pattern'] The value '1test' is not " .
+ "accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
+ "Element 'entityType', attribute 'model': '1test' is not a valid value of the atomic type" .
" 'modelName'.\nLine: 1\n"
],
],
diff --git a/app/code/Magento/ImportExport/etc/export.xsd b/app/code/Magento/ImportExport/etc/export.xsd
index 65728a9be5c62..f62dbc891ef0f 100644
--- a/app/code/Magento/ImportExport/etc/export.xsd
+++ b/app/code/Magento/ImportExport/etc/export.xsd
@@ -71,11 +71,11 @@
- Model name can contain only [A-Za-z_\\].
+ Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
-
+
diff --git a/app/code/Magento/ImportExport/etc/import.xsd b/app/code/Magento/ImportExport/etc/import.xsd
index aefa6541d7e13..e73038ebc0710 100644
--- a/app/code/Magento/ImportExport/etc/import.xsd
+++ b/app/code/Magento/ImportExport/etc/import.xsd
@@ -61,11 +61,11 @@
- Model name can contain only [A-Za-z_\\].
+ Model name can contain only ([\\]?[a-zA-Z_][a-zA-Z0-9_]*)+.
-
+