PluginProbe
Packeta / 2.1
Packeta v2.1
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / deps / nette / forms / src / Forms / Rule.php

Rule.php in Packeta 2.1, at deps/nette/forms/src/Forms/Rule.php

35 lines 823 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * This file is part of the Nette Framework (https://nette.org)
5 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6 */
7 declare (strict_types=1);
8 namespace Packetery\Nette\Forms;
9
10 use Packetery\Nette;
11 /**
12 * Single validation rule or condition represented as value object.
13 */
14 class Rule
15 {
16 use \Packetery\Nette\SmartObject;
17 /** @var Control */
18 public $control;
19 /** @var mixed */
20 public $validator;
21 /** @var mixed */
22 public $arg;
23 /** @var bool */
24 public $isNegative = \false;
25 /** @var string|null */
26 public $message;
27 /** @var Rules|null for conditions */
28 public $branch;
29 /** @internal */
30 public function canExport() : bool
31 {
32 return \is_string($this->validator) || \Packetery\Nette\Utils\Callback::isStatic($this->validator);
33 }
34 }
35