Skip to content

Conversation

jayankaghosh
Copy link
Contributor

Form validation with identical field names does not work as expected

Description

Assign indices to array inputs and later remove them before submitting as a workaround for the validation library to work properly.

Fixed Issues (if relevant)

  1. M2.1.3 : Form validation with identical field names does not work as expected. #8258 Form validation with identical field names does not work as expected

Manual testing scenarios

  1. Create a form with identical fields and add JavaScript validation
  2. Submit the form with improper values in fields.
  3. Validation should work properly now

@VladimirZaets VladimirZaets mentioned this pull request May 29, 2018
@VladimirZaets
Copy link
Contributor

Hi @jayankaghosh , thanks for fixes.

Copy link

@gautamkrishnar gautamkrishnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@jayankaghosh
Copy link
Contributor Author

Oh didn't follow on this for a long time. So this is fixed now? Cool!
P.S I can see the Travis CI failed due to code standard not being proper. So does that need to be reworked on?

@sivaschenko sivaschenko self-assigned this Nov 19, 2018
@jayankaghosh
Copy link
Contributor Author

@VasylShvorak This issue is resolved now.
The only drawback is, if the mage/validation plugin is used on a form, no other form submit listeners should be attached to the form, or, a submitHandler has to be explicitly mentioned where the further form submit listeners need to be specified.
I believe this is a very particular and rare scenario and should not happen that often. It should work with all existing Magento's forms which are using the mage/validation

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-5174 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@magento-cicd2
Copy link
Contributor

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ jayankaghosh
✅ VladimirZaets
✅ p-bystritsky
❌ ysapiga

1 similar comment
@magento-cicd2
Copy link
Contributor

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ jayankaghosh
✅ VladimirZaets
✅ p-bystritsky
❌ ysapiga

@m2-assistant
Copy link

m2-assistant bot commented Jul 7, 2019

Hi @jayankaghosh, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.3 milestone Jul 7, 2019
magento-engcom-team pushed a commit that referenced this pull request Jul 7, 2019
@sidolov sidolov added the Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests label Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.