aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/Form.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt
index 2c71e6a1..8f63662e 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt
@@ -297,7 +297,7 @@ class Form<K : Any>(private val panel: FormPanel<K>? = null, private val seriali
@Suppress("UNCHECKED_CAST")
val fieldsParams = (entry.value as? FieldParams<FormControl>)
val required = fieldsParams?.required ?: false
- val requiredError = control.getValue() == null && required
+ val requiredError = control.getValue() == null && control.visible && required
if (requiredError) {
control.validatorError = trans(fieldsParams?.requiredMessage) ?: "Value is required"
true