nortmas
3/22/2018 - 12:36 PM

Make Required

<?php

$profile_customer->get('field_customer_gender')->getFieldDefinition()->set('required', TRUE);