-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Description
If I attempt to create a new route for a module, and that module's front name is less than three characters
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="standard">
<route id="hello-world" frontName="hw">
<module name="Pulsestorm_HelloPestle"/>
</route>
</router>
</config>
Magento's XML validator complains
Element 'route', attribute 'frontName': [facet 'pattern'] The value 'hw' is not accepted by the pattern '[A-Za-z0-9_\-]{3,}'.
It looks like the regular expressions for validating this element ([A-Za-z0-9_]{3,}
) demands a frontName
be at least three characters.
Based on the behavior of other PHP frameworks (which allow segments shorter than three characters), this is a bug and should be fixed.