#' Hash256 class
#'
#' The hex representation of a 256-bit hash.
#'
#' A character vector where each element must match the regular expression
#' \code{"^$|^[A-Fa-f0-9]{64}$"}.
#'
#' @export Hash256
#' @exportClass Hash256
Hash256 <- setClass("Hash256", contains = "character")
validHash256Object <- function(object) {
if (!all(grepl("^$|^[A-Fa-f0-9]{64}$", object))) {
return("Invalid hash.")
}
return(TRUE)
}
setValidity("Hash256", validHash256Object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.