public function validateTargetAudienceSettings() {
    $errorMessages = [];

    // @TODO: Enable validation after CRM is updated.
    return [];

    // Age is in the range from Target Audience Setting from Campaign.
    $validateAge = $this->validateMemberAge();
    if (!$validateAge['status']) {
      $errorMessages[] = $validateAge['error'];
    }

    // Member type match Target Audience Setting from Campaign.
    $validateMemberUnitType = $this->validateMemberUnitType();
    if (!$validateMemberUnitType['status']) {
      $errorMessages[] = $validateMemberUnitType['error'];
    }
    // Branch is one of the selected in the Target Audience Setting from Campaign.
    $validateMemberBranch = $this->validateMemberBranch();
    if (!$validateMemberBranch['status']) {
      $errorMessages[] = $validateMemberBranch['error'];
    }

    return $errorMessages;
  }
public function validateTargetAudienceSettings() {
    $errorMessages = [];

    // @TODO: Enable validation after CRM is updated.
    return [];

    // Age is in the range from Target Audience Setting from Campaign.
    $validateAge = $this->validateMemberAge();
    if (!$validateAge['status']) {
      $errorMessages[] = $validateAge['error'];
    }

    // Member type match Target Audience Setting from Campaign.
    $validateMemberUnitType = $this->validateMemberUnitType();
    if (!$validateMemberUnitType['status']) {
      $errorMessages[] = $validateMemberUnitType['error'];
    }
    // Branch is one of the selected in the Target Audience Setting from Campaign.
    $validateMemberBranch = $this->validateMemberBranch();
    if (!$validateMemberBranch['status']) {
      $errorMessages[] = $validateMemberBranch['error'];
    }

    return $errorMessages;
  }
public function validateTargetAudienceSettings ( ) { $ errorMessages = [ ] ; // @TODO: Enable validation after CRM is updated. return [ ] ; // Age is in the range from Target Audience Setting from Campaign. $ validateAge = $ this -> validateMemberAge ( ) ; if ( ! $ validateAge [ 'status' ] ) { $ errorMessages [ ] = $ validateAge [ 'error' ] ; } // Member type match Target Audience Setting from Campaign. $ validateMemberUnitType = $ this -> validateMemberUnitType ( ) ; if ( ! $ validateMemberUnitType [ 'status' ] ) { $ errorMessages [ ] = $ validateMemberUnitType [ 'error' ] ; } // Branch is one of the selected in the Target Audience Setting from Campaign. $ validateMemberBranch = $ this -> validateMemberBranch ( ) ; if ( ! $ validateMemberBranch [ 'status' ] ) { $ errorMessages [ ] = $ validateMemberBranch [ 'error' ] ; } return $ errorMessages ; }
Validate by Target Audience Settings from Campaign.

@return array Array of error messages. Will be empty if validation passed.
Validate by Target Audience Settings from Campaign .