Closed
Description
When using a UI Component and adding the "stripped-min-length" validation as a rule to an input component, if the user inputs a "special" character (e.g. /, &, etc.) a javascript error is thrown.
Preconditions
- Magento EE 2.1.7, Magento CE 2.1.7
- PHP 7.0.17
- MySQL 5.7.18
Steps to reproduce
-
Create a UI Component based form
-
Add the following validation to the XML form element definition
<item name="validation" xsi:type="array"> <item name="required-entry" xsi:type="boolean">true</item> <item name="no-whitespace" xsi:type="boolean">true</item> <item name="stripped-min-length" xsi:type="string">4</item> </item>
-
Test in admin using value
a/b
orab/
ora&c
Expected result
- Element should be invalidated due to length restriction