3 namespace wcf\system\exception
;
6 * UserInputException handles all formular input errors.
9 * @copyright 2001-2019 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Exception
13 class UserInputException
extends UserException
28 * variables for AJAX error handling
31 protected $variables = [];
34 * Creates a new UserInputException.
36 * @param string $field affected formular field
37 * @param string $type kind of this error
38 * @param array $variables additional variables for AJAX error handling
40 public function __construct($field = '', $type = 'empty', array $variables = [])
42 $this->field
= $field;
44 $this->variables
= $variables;
45 $this->message
= 'Parameter ' . $field . ' is missing or invalid';
47 parent
::__construct();
51 * Returns the affected formular field of this error.
55 public function getField()
61 * Returns the kind of this error.
65 public function getType()
71 * Returns additional variables for AJAX error handling.
75 public function getVariables()
77 return $this->variables
;