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

Issue in collections validation #139

Open
igoryasko31 opened this issue Feb 19, 2018 · 2 comments
Open

Issue in collections validation #139

igoryasko31 opened this issue Feb 19, 2018 · 2 comments
Labels
Milestone

Comments

@igoryasko31
Copy link

The issue occurs in the 'addPrototype' method.

var prototype = FpJsFormValidator.preparePrototype( FpJsFormValidator.cloneObject(item.jsFormValidator.prototype), name, item.jsFormValidator.id + '_' + name );

The third parameter of the method 'preparePrototype' is the 'Id' of element + unique index.
The method replaces the substring 'name' of the prototype to the third parameter.
As result, the ID contains a duplicate of the substring. The example below:
ID (passed as the third parameter): checkout_info_orderItems_0_delegates_1
_ID after 'preparePrototype' calls: checkout_info_orderItems_0_delegates_checkout_info_orderItems_0_delegates_1_phone _

I think the 'preparePrototype' method should get the only unique index as the third parameter. Does it make sense?

@66Ton99 66Ton99 added the bug label Feb 20, 2018
@66Ton99 66Ton99 added this to the 1.5.2 milestone Feb 20, 2018
@66Ton99
Copy link
Collaborator

66Ton99 commented Feb 20, 2018

Why not? PR are welcome.

@pk16011990
Copy link

my fix is in shopsys/shopsys#180

It is about replace id to name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants