1

I am trying to migrate some data with the migrate api in a custom entity called Seller.

Each seller has an email address with a constraint "UniqueField" which checks, that the email address is just entered once. If i try to import a seller with an existing email address, the seller will be created although the email already exists.

So my question is: Doesn't the migration api consider the entity validation or how can I do this?

One solution for the problem would be to write a custom process plugin for the email address, but it would be nice, if the entity validation would check this automatically.

1 Answer 1

0

There is an open core issue to add validation to content entities: https://www.drupal.org/node/2745797

With that patch, you can enable validation thusly:

destination: plugin: entity:node validate: true 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.