Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
IsBooleanValidator.php
Go to the documentation of this file.
1<?php
2
7
10
12
13 public function __construct() {
14 $this->message = "This value should be a boolean";
15 }
16
17 public function validate($value) {
18 parent::validate ( $value );
19 if ($this->notNull !== false) {
20 return UString::isBooleanStr ( $value );
21 }
22 return true;
23 }
24
30 public function getParameters(): array {
31 return [ "value" ];
32 }
33}
34
getParameters()
{{}\Ubiquity\contents\validation\validators\ValidatorInterfacegetParameters()}
String utilities.
Definition UString.php:15