Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • None
  • PHP

Classes

  • Form
  • FormContainer
  • FormGroup
  • Rule
  • Rules

Interfaces

  • IFormControl
  • IFormRenderer
  • ISubmitterControl
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (http://nette.org)
 5:  *
 6:  * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
 7:  *
 8:  * For the full copyright and license information, please view
 9:  * the file license.txt that was distributed with this source code.
10:  * @package Nette\Forms
11:  */
12: 
13: 
14: 
15: /**
16:  * Single validation rule or condition represented as value object.
17:  *
18:  * @author     David Grudl
19:  * @package Nette\Forms
20:  */
21: final class Rule extends Object
22: {
23:     /** type */
24:     const CONDITION = 1;
25: 
26:     /** type */
27:     const VALIDATOR = 2;
28: 
29:     /** type */
30:     const FILTER = 3;
31: 
32:     /** @var IFormControl */
33:     public $control;
34: 
35:     /** @var mixed */
36:     public $operation;
37: 
38:     /** @var mixed */
39:     public $arg;
40: 
41:     /** @var int (CONDITION, VALIDATOR, FILTER) */
42:     public $type;
43: 
44:     /** @var bool */
45:     public $isNegative = FALSE;
46: 
47:     /** @var string (only for VALIDATOR type) */
48:     public $message;
49: 
50:     /** @var Rules (only for CONDITION type)  */
51:     public $subRules;
52: 
53: }
54: 
Nette Framework 2.0.8 (for PHP 5.2, un-prefixed) API API documentation generated by ApiGen 2.8.0