Question

How can I have the field validation settings (via the field validation module) bundle with the content type using Features module?

eg: I have a content type Post and a field validation that says post's title must match a certain regex. I need to bundle this logic up with Features.

Thank you!

Était-ce utile?

La solution

It looks like the field validation module has it's own configuration entity type. This means that in the feature editor there should be a section labeled something like Field Validation Rule Sets.

Select the appropriate configuration under this section to include it with your content type feature.

I assume that you know that to include the content definition you need a minimum of the content type, the individual fields (storage and field settings), the entity form display, and entity view display.

There may be other specialty items like language settings here. Enter the machine name of the content type in the feature editor search field (after checking include conflicts) to find them. NOTE: Red indicates they are part of another feature and you may not need to include them.

Licencié sous: CC-BY-SA avec attribution
Non affilié à drupal.stackexchange
scroll top