Skip to content

Commit 7d10c93

Browse files
committed
consolidate validators with valid_keys for date, type, language
1 parent 70c07a3 commit 7d10c93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/geoflow_validator.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ geoflow_validator_entity_Date <- R6Class("geoflow_validator_entity_Date",
456456
#'@param j col index (internal index to be used for graphical \pkg{geoflow} validation handlers)
457457
#'@param str string to validate
458458
initialize = function(i, j, str){
459-
valid_keys <- list("creation","publication","edition","embargo")
459+
valid_keys <- list(geometa::ISODateType$values(),"edition","embargo")
460460
super$initialize(TRUE,TRUE, TRUE, valid_keys, "creation",FALSE, TRUE, TRUE, i, j, as(str,"character"))
461461
},
462462

@@ -512,7 +512,7 @@ geoflow_validator_entity_Type <- R6Class("geoflow_validator_entity_Type",
512512
#'@param j col index (internal index to be used for graphical \pkg{geoflow} validation handlers)
513513
#'@param str string to validate
514514
initialize = function(i, j, str){
515-
valid_keys <- list()
515+
valid_keys <- list("generic", "zenodoResourceType")
516516
super$initialize(FALSE,T, TRUE, valid_keys, "generic",T, TRUE, TRUE, i, j, str)
517517
}
518518
)
@@ -532,7 +532,7 @@ geoflow_validator_entity_Language <- R6Class("geoflow_validator_entity_Language"
532532
#'@param j col index (internal index to be used for graphical \pkg{geoflow} validation handlers)
533533
#'@param str string to validate
534534
initialize = function(i, j, str){
535-
valid_keys <- list()
535+
valid_keys <- geometa::ISOLanguage$values()
536536
super$initialize(TRUE,FALSE, FALSE, valid_keys, "eng",TRUE, TRUE, TRUE, i, j, str)
537537
},
538538

0 commit comments

Comments
 (0)