20 private $field =
null;
21 private $value =
null;
31 public function __construct($field, $value, $message=
"", $code=0, \Exception $previous=
null) {
32 parent::__construct($message, $code, $previous);
33 $this->field = $field;
34 $this->value = $value;
59 if ($this->field !=
null) {
60 $msg .=
'Invalid value ('.$this->value.
') for '.$this->field.
': ';
62 return $msg.$this->getMessage();
ValidationException signals an exception in validation.
__toString()
Get a string representation of the exception.
getField()
Get the name of the field.
getValue()
Get the value of the field.
__construct($field, $value, $message="", $code=0, \Exception $previous=null)
Constructor.