Validation logic bug, required with logic hidden (#164)
This commit is contained in:
parent
11ad626a72
commit
c42c7ca97c
|
@ -39,7 +39,7 @@ class FormLogicPropertyResolver
|
||||||
}
|
}
|
||||||
|
|
||||||
$conditionsMet = FormLogicConditionChecker::conditionsMet($this->logic['conditions'], $this->formData);
|
$conditionsMet = FormLogicConditionChecker::conditionsMet($this->logic['conditions'], $this->formData);
|
||||||
if ($conditionsMet && $this->property['required'] && count($this->logic['actions']) > 0 && in_array('make-it-optional', $this->logic['actions'])) {
|
if ($conditionsMet && $this->property['required'] && count($this->logic['actions']) > 0 && (in_array('make-it-optional', $this->logic['actions']) || in_array('hide-block', $this->logic['actions']))) {
|
||||||
return false;
|
return false;
|
||||||
} else if ($conditionsMet && !$this->property['required'] && count($this->logic['actions']) > 0 && in_array('require-answer', $this->logic['actions'])) {
|
} else if ($conditionsMet && !$this->property['required'] && count($this->logic['actions']) > 0 && in_array('require-answer', $this->logic['actions'])) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue