use InShore\Bookwhen\Exceptions\InshoreBookwhenException;
8
9
/**
10
* InshoreBookwhenConfigurationException Class
11
*
12
* @package inshore\Bookwhen
13
*/
14
class ValidationException extends InshoreBookwhenException
15
{
16
private $key;
17
18
private $value;
19
20
/**
21
*
22
* @param string $key
23
* @param array|boolean|object|int|string $value
24
*/
25
2
public function __construct($key, $value)
26
{
27
2
$this->key = $key;
28
2
$this->value = $value;
29
}
30
31
/**
32
*
33
* @return string
34
*/
35
public function errorMessage()
36
{
37
return 'Validation Error!<br/>The value "' . $this->value . '" is invalid for ' . $this->key . '.<br/>Please refer to the package documentation <a href=https://github.com/inshore/bookwhen>https://github.com/inshore/bookwhen</a> or <a href=https://api.bookwhen.com/v2>https://api.bookwhen.com/v2</a>';