shinyvalidate
shinyvalidate copied to clipboard
sv_regex throws error when value is NULL
The sv_regex function will throw an error if the value is NULL.
If the checked value is NULL, then the value of 'result' will be 'logical(0)', causing this line in the code to throw an error: https://github.com/rstudio/shinyvalidate/blob/575f5865fcb028656b58760ba357b6247b97d866/R/rules.R#L260
A fix would be to change this line to:
if (!isTRUE(result)) {