Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stripped-min-length Validation via UI Component Fails with "special" characters #9920

Closed
bap14 opened this issue Jun 12, 2017 · 7 comments
Closed
Labels
bug report Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@bap14
Copy link

bap14 commented Jun 12, 2017

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

  1. Magento EE 2.1.7, Magento CE 2.1.7
  2. PHP 7.0.17
  3. MySQL 5.7.18

Steps to reproduce

  1. Create a UI Component based form

  2. 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>
    
  3. Test in admin using value a/b or ab/ or a&c

Expected result

  1. Element should be invalidated due to length restriction

Actual result

  1. Javascript syntax error
    screen shot 2017-06-12 at 11 25 11 am
    screen shot 2017-06-12 at 11 25 46 am
@veloraven
Copy link
Contributor

@bap14 thank you for your report.
Given this issue is reported against Enterprise edition, please report via the Support portal of your account or Partner portal if you are a partner reporting on behalf of a merchant. Github is intended for Community edition reports given no account management for CE users. This will allow for proper tracking of issues at the account level.

@bap14
Copy link
Author

bap14 commented Jun 13, 2017

@veloraven I installed Magento CE 2.1.7 and added my custom module and confirmed this does occur in the CE release as well. I would prefer to keep this in the public domain in case there are other developers running into this same issue. I can report it in both if necessary. I'll update the initial posting to include the CE edition as well.

@bap14
Copy link
Author

bap14 commented Jun 17, 2017

I didn't specify this earlier, but I was working in the admin area, not the frontend.

@magento-engcom-team magento-engcom-team added 2.1.x bug report Area: Frontend Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed and removed Area: Frontend labels Sep 20, 2017
@magento-engcom-team
Copy link
Contributor

@bap14, thank you for your report.
We've created internal ticket(s) MAGETWO-75838 to track progress on the issue.

@magento-engcom-team
Copy link
Contributor

Hi @bap14 the issue has been fixed in 2.2.1 and will be available soon (#11084)

@bap14
Copy link
Author

bap14 commented Oct 6, 2017

That's fantastic news!! Thank you!

@magento-team
Copy link
Contributor

Hi @bap14. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1282 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-team magento-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

5 participants