fix: валидация данных больше не ругается на наличие пустых значений в select_one и select_multiple формах

This commit is contained in:
2026-04-11 22:05:17 +03:00
parent b80188b1ad
commit dc3b8f1d08

View File

@@ -88,6 +88,10 @@ init_val <- function(scheme, ns) {
if (form_type %in% c("select_multiple", "select_one")) { if (form_type %in% c("select_multiple", "select_one")) {
iv$add_rule(x_input_id, function(x) { iv$add_rule(x_input_id, function(x) {
if (length(x) == 1) {
if (check_for_empty_data(x)) return(NULL)
}
# проверка на соответствие вариантов схеме --------- # проверка на соответствие вариантов схеме ---------
compare_to_dict <- (x %in% choices) compare_to_dict <- (x %in% choices)
if (!all(compare_to_dict)) { if (!all(compare_to_dict)) {