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:
8: namespace Nette\Forms;
9:
10: use Nette;
11:
12:
13: /**
14: * Single validation rule or condition represented as value object.
15: *
16: * @author David Grudl
17: */
18: class Rule extends Nette\Object
19: {
20: /** type */
21: const CONDITION = 1;
22:
23: /** type */
24: const VALIDATOR = 2;
25:
26: /** @var IControl */
27: public $control;
28:
29: /** @var mixed */
30: public $operation;
31:
32: /** @var mixed */
33: public $arg;
34:
35: /** @var int (CONDITION, VALIDATOR, FILTER) */
36: public $type;
37:
38: /** @var bool */
39: public $isNegative = FALSE;
40:
41: /** @var string (only for VALIDATOR type) */
42: public $message;
43:
44: /** @var Rules (only for CONDITION type) */
45: public $subRules;
46:
47: }
48: