# billingo/4.2.9/src/Validation/DocumentBlock/DocumentBlockValidator.php

Billingo Official for WooCommerce, version 4.2.9. 23 lines.

- Page: https://pluginprobe.com/plugins/billingo/4.2.9/code/src/Validation/DocumentBlock/DocumentBlockValidator.php
- Raw: https://pluginprobe.com/plugins/billingo/4.2.9/raw/src/Validation/DocumentBlock/DocumentBlockValidator.php
- Modified: 2025-05-26T04:53:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/billingo/4.2.9/code/src/Validation/DocumentBlock/DocumentBlockValidator.php#L10-L20`.

```php
<?php

namespace App\Billingo\Validation\DocumentBlock;

use App\Billingo\Enums\DocumentBlockTypeEnum;
use App\Billingo\Validation\Validator;

class DocumentBlockValidator extends Validator
{

    protected function rules(): array
    {
        return [
            'id' => ['optional', 'integer'],
            'name' => ['optional', 'string'],
            'prefix' => ['optional', 'string'],
            'custom_field1' => ['optional', 'string'],
            'custom_field2' => ['optional', 'string'],
            'type' => ['optional', 'string', ['in', getEnumValues(DocumentBlockTypeEnum::class)]],
        ];
    }
}

```
