I'm attempting to follow this documentation to add a custom constraint to a field in a Paragraph but I'm having trouble actually accessing that field.
Currently I have my_content_type
with paragraph_field
. This field accepts a number of different paragraph types. I'd like to be able to add a constraint to a field on a specific paragraph type that could be added to that field.
I've tried using hook_entity_bundle_field_info_alter
, hook_form_alter
, and hook_field_widget_form_alter
but am having trouble actually accessing the proper field.
Is there a better way to do this?