Upgrade to 3.5.7

This commit is contained in:
Bastian Allgeier
2021-07-02 11:34:29 +02:00
parent 5358f8885c
commit 62b533a28f
37 changed files with 329 additions and 233 deletions

View File

@@ -463,6 +463,12 @@ V::$validators = [
* Checks that the value has the given size
*/
'size' => function ($value, $size, $operator = '=='): bool {
// if value is field object, first convert it to a readable value
// it is important to check at the beginning as the value can be string or numeric
if (is_a($value, '\Kirby\Cms\Field') === true) {
$value = $value->value();
}
if (is_numeric($value) === true) {
$count = $value;
} elseif (is_string($value) === true) {