Bulk model creation and unique validation

Hi there,

How do you address a bulk model creation when the model has a unique attribute?

I created an action (actionClone) in the controller which basically renders the creation form plus a field to select the quantity of models to be created, so when the user enter a number, that quantity of inputs are displayed and they stand for the unique attribute of each model. I added those fields to the form through yii.Activeform js and the required validation is working. The problem is I don’t know how to set them as unique on client side, as they are not actually part of a model.

Any suggestions?