Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
IsTrueValidator.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\contents\validation\validators\basic
;
4
5
use
Ubiquity\utils\base\UString
;
6
use
Ubiquity\contents\validation\validators\ValidatorHasNotNull
;
7
8
class
IsTrueValidator
extends
ValidatorHasNotNull
{
9
10
public
function
__construct
() {
11
$this->message =
"This value should return true"
;
12
}
13
14
public
function
validate
(
$value
) {
15
parent::validate (
$value
);
16
if
($this->notNull !==
false
) {
17
return
UString::isBooleanTrue (
$value
);
18
}
19
return
true
;
20
}
21
27
public
function
getParameters
(): array {
28
return [
"value"
];
29
}
30
}
31
Ubiquity\contents\validation\validators\ValidatorHasNotNull
Definition
ValidatorHasNotNull.php:8
Ubiquity\contents\validation\validators\Validator\$value
$value
Definition
Validator.php:15
Ubiquity\contents\validation\validators\basic\IsTrueValidator
Definition
IsTrueValidator.php:8
Ubiquity\contents\validation\validators\basic\IsTrueValidator\getParameters
getParameters()
{{}\Ubiquity\contents\validation\validators\ValidatorInterfacegetParameters()}
Definition
IsTrueValidator.php:27
Ubiquity\contents\validation\validators\basic\IsTrueValidator\__construct
__construct()
Definition
IsTrueValidator.php:10
Ubiquity\contents\validation\validators\basic\IsTrueValidator\validate
validate($value)
Definition
IsTrueValidator.php:14
Ubiquity\utils\base\UString
String utilities.
Definition
UString.php:15
Ubiquity\contents\validation\validators\basic
Basic validators.
Definition
IsBooleanValidator.php:6
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
contents
validation
validators
basic
IsTrueValidator.php
Generated on Sun Dec 10 2023 15:04:14 for
Ubiquity
by
doxygen
1.9.8