benkeen / generatedata

A powerful, feature-rich, random test data generator.
https://generatedata.com
2.21k stars 611 forks source link

JSON validation should fail when multiple rows have same title #796

Open benkeen opened 1 year ago

benkeen commented 1 year ago

Minor, but still invalid & should be caught. Note that this doesn't apply to all Export Types. With XML, for example, it's perfectly valid.

benkeen commented 1 year ago

This requires an enhancement of the core script.

Right now the Export Types do the job of validating the title field via the validateTitleField callback (ETValidateTitleField interface). In order to accommodate this, that method will need to be updated to pass in all row titles, plus the index of the current row. That would enable it to show an appropriate error + notify the user about which rows were in conflict.