Url | R Documentation |
A validated URL field. Validation occurs during both serialization and deserialization
staypuft::FieldABC
-> staypuft::Field
-> Url
new()
Create a new Url object
Url$new(..., relative = FALSE, schemes = NULL, require_tld = TRUE)
relative
Whether to allow relative URLs. NOT WORKING YET
schemes
Valid schemes. By default http
, https
, ftp
, and
ftps
are allowed
require_tld
Whether to reject non-FQDN hostnames. NOT WORKING YET
validate_url()
Url$validate_url(relative = FALSE, schemes = NULL, require_tld = TRUE)
clone()
The objects of this class are cloneable with this method.
Url$clone(deep = FALSE)
deep
Whether to make a deep clone.
aschema <- Schema$new("aSchema", url = fields$url() ) aschema aschema$load(list(url = "https://ropensci.org/")) # good if (interactive()) aschema$load(list(url = 6)) # bad sch <- Schema$new("anotherschema", url = fields$url(schemes = c("https", "ftps")) ) if (interactive()) sch$load(list(url = "http://google.com")) # bad
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.