diff --git a/src/classes/repositories/class-tainacan-collections.php b/src/classes/repositories/class-tainacan-collections.php index 21c800cda..9d94a243f 100644 --- a/src/classes/repositories/class-tainacan-collections.php +++ b/src/classes/repositories/class-tainacan-collections.php @@ -201,7 +201,7 @@ class Collections extends Repository { 'type' => 'string', 'description' => __( 'The status of collection comment, if is allowed, so is "open", or is "closed".', 'tainacan' ), 'default' => get_default_comment_status(Entities\Collection::get_post_type()), - 'validation' => v::optional(stringType()->in( [ 'open', 'closed' ] )), + 'validation' => v::optional(v::stringType()->in( [ 'open', 'closed' ] )), ] ] ); diff --git a/src/classes/repositories/class-tainacan-items.php b/src/classes/repositories/class-tainacan-items.php index 238989c5f..df1a372de 100644 --- a/src/classes/repositories/class-tainacan-items.php +++ b/src/classes/repositories/class-tainacan-items.php @@ -113,7 +113,7 @@ class Items extends Repository { 'type' => 'string', 'description' => __( 'The status of item comment, if is allowed, so is "open" or is "closed".', 'tainacan' ), 'default' => get_default_comment_status(Entities\Collection::get_post_type()), - 'validation' => v::optional(stringType()->in( [ 'open', 'closed' ] )), + 'validation' => v::optional(v::stringType()->in( [ 'open', 'closed' ] )), ] ] ); }