Ensure all checkboxes are boolean when validating
Dieser Commit ist enthalten in:
Ursprung
2dc7ada433
Commit
b0223cc62d
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
|
@ -213,6 +213,11 @@ class CustomWizard::Builder
|
||||||
label = field['label'] || I18n.t("#{field['key']}.label")
|
label = field['label'] || I18n.t("#{field['key']}.label")
|
||||||
updater.errors.add(field['id'].to_s, I18n.t('wizard.field.too_short', label: label, min: min_length.to_i))
|
updater.errors.add(field['id'].to_s, I18n.t('wizard.field.too_short', label: label, min: min_length.to_i))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
## ensure all checkboxes are booleans
|
||||||
|
if field['type'] === 'checkbox'
|
||||||
|
updater.fields[field['id']] = value == true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_topic(user, action, data)
|
def create_topic(user, action, data)
|
||||||
|
|
Laden …
In neuem Issue referenzieren