PluginProbe
Billingo Official for WooCommerce / 4.2.9
Billingo Official for WooCommerce v4.2.9
4.3.3 4.3.2 trunk 0.0.2 1.0.0 2.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 All 82 releases
billingo / src / Validation / DocumentBlock / DocumentBlockValidator.php

DocumentBlockValidator.php in Billingo Official for WooCommerce 4.2.9, at src/Validation/DocumentBlock/DocumentBlockValidator.php

23 lines 621 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace App\Billingo\Validation\DocumentBlock;
4
5 use App\Billingo\Enums\DocumentBlockTypeEnum;
6 use App\Billingo\Validation\Validator;
7
8 class DocumentBlockValidator extends Validator
9 {
10
11 protected function rules(): array
12 {
13 return [
14 'id' => ['optional', 'integer'],
15 'name' => ['optional', 'string'],
16 'prefix' => ['optional', 'string'],
17 'custom_field1' => ['optional', 'string'],
18 'custom_field2' => ['optional', 'string'],
19 'type' => ['optional', 'string', ['in', getEnumValues(DocumentBlockTypeEnum::class)]],
20 ];
21 }
22 }
23