The doc-type array[string] could not be parsed: Expected "]" at position 2, but found "string". (view supported doc-types)
This check marks PHPDoc comments that could not be parsed by our parser. To see
which comment annotations we can parse, please refer to our documentation on
supported doc-types.
Loading history...
25
*/
26
public function getErrors()
27
{
28
return $this->errors;
29
}
30
31
/**
32
*
33
*/
34
public function dataValid()
35
{
36
if (!strlen($this->getValueUser()) && !$this->required) {
37
// don't apply checks, if empty and not required
38
return true;
39
} else {
40
$allValid = true;
41
42
foreach ($this->checks as $key => $check) {
43
$valid = $check($this->getValueUser());
44
$allValid = $allValid && $valid;
45
if (!$valid)
46
$this->errors[] = $check->getMessage();
47
}
48
49
if (!$allValid && $this instanceof \hemio\form\Focusable)
50
$this->setAutofocus(true, 20);
51
52
return $allValid;
53
}
54
}
55
/**
56
*
57
* @var array[Check]
58
*/
59
public $checks = [];
60
61
/**
62
*
63
* @param Check $check
64
*/
65
public function addValidityCheck(\hemio\form\Check $check)
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.