Skip to content

Commit

Permalink
Improved input validation on numerics (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Sep 25, 2024
1 parent 87f05ed commit a8b8328
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ ui <- fluidPage(
wellPanel(
h2("Select covariates"),
radioButtons("sex", "Sex", c("Male", "Female")),
numericInput("height", "Height (cm)", value = 0, min = 0),
numericInput("bmi", "BMI", value = 0, min = 0)
numericInput(
"height", "Height (cm)",
value = 100L, min = 0L, step = 1L, max = 200L
),
numericInput(
"bmi", "BMI",
value = 20, min = 0, max = 50, step = 0.1
)
),
actionButton("submit", "Calculate endpoints")
),
Expand Down

0 comments on commit a8b8328

Please sign in to comment.