validateThenCSS: Extends 'shiny::validate' to produce an informative pop-up...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/validateThenCSS.R

Description

Extends shiny::validate to produce an informative pop-up message and applies a CSS class if invalid

Usage

1
2
validateThenCSS(session, inputId, ..., errorTitle = NULL,
  invalidCSS = "invalidInput", raiseModal = TRUE)

Arguments

session

The shiny client session.

inputId

The input id to be validated.

...

function calls to need.

errorTitle

Optional error title string to be passed to link{errorMessage}.

invalidCSS

CSS class to be applied if invalid, or removed if valid.

raiseModal

Logical, raise a modal sweetAlert if the input is invalid.

Value

Invisible TRUE if executes correctly, can be used for further validation or resets.

Author(s)

Andrea Berardi Andrea.Berardi@PAREXEL.com

See Also

validateThen, errorMessage, validate, need

Examples

1
2
3
## Not run: validateThenCSS(session,
"inputId", need(!is.na(x), "x is NA"))
## End(Not run)

PAREXEL-PAC/shinyPlusPXL documentation built on March 14, 2020, 3:11 p.m.