fix validation function

This commit is contained in:
Jacson Passold 2018-08-16 11:36:50 -03:00
parent 8ef4cbc7a3
commit 0545a83717
2 changed files with 2 additions and 2 deletions

View File

@ -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' ] )),
]
] );

View File

@ -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' ] )),
]
] );
}