fix validation function
This commit is contained in:
parent
8ef4cbc7a3
commit
0545a83717
|
@ -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' ] )),
|
||||
]
|
||||
|
||||
] );
|
||||
|
|
|
@ -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' ] )),
|
||||
]
|
||||
] );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue