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

[Backport 2.1] Fix "pattern" UI Component validation #17213

Merged
merged 2 commits into from
Aug 1, 2018
Merged

[Backport 2.1] Fix "pattern" UI Component validation #17213

merged 2 commits into from
Aug 1, 2018

Conversation

mageprince
Copy link
Contributor

Original Pull Request

#11565

Description

Convert param string to regular expression using constructor and test on the RegExp object.

Fixed Issues (if relevant)

  1. Pattern Validation via UI Component Fails to Interpret String as RegEx Pattern #9919: Pattern Validation via UI Component Fails to Interpret String as RegEx Pattern

Manual testing scenarios

  1. Create a custom UI Component form

  2. Add a validation item to an input field

  3. Specify a pattern validation rule with a custom regular expression pattern. E.g.

     <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="pattern" xsi:type="string">^[a-zA-Z][a-zA-Z0-9_.-]{3,}$</item>
     </item>
    
  4. View form in admin browser and enter valid and invalid values (e.g. 3sdf and asd3)

Original Pull Request

#13742

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-2584 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @mageprince. Thank you for your contribution.
We will aim to release these changes as part of 2.1.15.
Please check the release notes for final confirmation.

@mageprince mageprince deleted the mageprince-2.1-patch-pull-11565 branch August 1, 2018 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants