/** * Constructor. * * @param string $check name of check that failed * @param mixed $value the value that isn't valid * @param string $message optional custom message * @param array $options */ public function __construct($check, $value, $message = null) { $this->check = $check; $this->value = $value; if (is_null($message)) { $message = "The validation check '{$check}' failed for value " . $this->getValueSimple(); } parent::__construct($message); }
function __construct($field = null) { $this->field = $field; $message = 'A validation Exception occurred'; if ($field) { $message .= ' with ' . $field; } parent::__construct($message); }
public function __construct(array $violations) { $this->violations = $violations; parent::__construct('Input validation failed', 400); }
/** * Constructor for ValidationException where the exception will appear * as "Validation failed for [$trigger] with value [$value]: $message". * * @param string $trigger the trigger for the validation error * @param string $value the value for the trigger * @param string $message the message representing the error in validation */ public function __construct($trigger, $value, $message) { $this->trigger = $trigger; parent::__construct($trigger, $value, $message); }
public function __construct($paramName, $code = null, $previous = null) { parent::__construct(sprintf($this->msg, $paramName), $code, $previous); }
public function __construct() { parent::__construct('The coupon was not found', 0, null); }
/** * Create a new ValidationException. * * @param string $userMessage The message displayed to the user * @param string $logMessage the message logged * * @return does not return a value. */ public function __construct($userMessage = '', $logMessage = '') { parent::__construct($userMessage, $logMessage); }
public function __construct() { parent::__construct('The product was not found', 0, null); }
public function __construct($name, $value) { parent::__construct('Validation of value "' . $value . '" for argument "' . $name . '" is not numerical.'); }
public function __construct() { parent::__construct('The coupon was already added', 0, null); }
public function __construct($has, $expected) { parent::__construct('Expected type was "' . $expected . '", but type was "' . $has . '".'); }