From 9d3a76b1f58c61af45aa7b42a69e37b26a86580c Mon Sep 17 00:00:00 2001 From: Vladislav Dolgov Date: Tue, 18 Mar 2025 12:50:56 +0300 Subject: [PATCH] fix validation errors --- CHANGELOG.md | 1 + app.R | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ec8502..9efaed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - fixed not erasing inputs while loading empty values (with checkboxes, radiobuttons); - +number input validation +- fix validation errors (2025-03-18); ##### changes - redesign work with db (open connection only when action performed) (2024-03-03); diff --git a/app.R b/app.R index c71b836..27efaea 100644 --- a/app.R +++ b/app.R @@ -38,7 +38,7 @@ SCHEME_MAIN <- readxl::read_xlsx(FILE_SCHEME) %>% # fill NA down fill(c(part, subgroup, form_id, form_label, form_type), .direction = "down") %>% group_by(form_id) %>% - fill(condition, .direction = "down") %>% + fill(c(condition, required), .direction = "down") %>% ungroup() # get list of simple inputs @@ -417,8 +417,8 @@ server <- function(input, output) { .x = names(inputs_simple_list), .f = \(x_input_id) { form_type <- inputs_simple_list[[x_input_id]] - choices <- filter(SCHEME_MAIN, form_id == {{ x_input_id }}) %>% pull(choices) - val_required <- filter(SCHEME_MAIN, form_id == {{ x_input_id }}) %>% + choices <- filter(SCHEME_MAIN, form_id == {{x_input_id}}) %>% pull(choices) + val_required <- filter(SCHEME_MAIN, form_id == {{x_input_id}}) %>% distinct(required) %>% pull(required)