Fix JSON schema regex pattern (#10811)
parent
313142c6cd
commit
70a7b592e9
|
@ -6,7 +6,7 @@
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Package name, including 'vendor-name/' prefix.",
|
"description": "Package name, including 'vendor-name/' prefix.",
|
||||||
"pattern": "^[a-z0-9]([_.-]?[a-z0-9]++)*+\/[a-z0-9](([_.]|-{1,2})?[a-z0-9]++)*+$"
|
"pattern": "^[a-z0-9]([_.-]?[a-z0-9]+)*\/[a-z0-9](([_.]|-{1,2})?[a-z0-9]+)*$"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
|
@ -25,9 +25,9 @@ class ComposerSchemaTest extends TestCase
|
||||||
$expectedError = array(
|
$expectedError = array(
|
||||||
array(
|
array(
|
||||||
'property' => 'name',
|
'property' => 'name',
|
||||||
'message' => 'Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]++)*+/[a-z0-9](([_.]|-{1,2})?[a-z0-9]++)*+$',
|
'message' => 'Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]|-{1,2})?[a-z0-9]+)*$',
|
||||||
'constraint' => 'pattern',
|
'constraint' => 'pattern',
|
||||||
'pattern' => '^[a-z0-9]([_.-]?[a-z0-9]++)*+/[a-z0-9](([_.]|-{1,2})?[a-z0-9]++)*+$',
|
'pattern' => '^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]|-{1,2})?[a-z0-9]+)*$',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue