Fix cleared custom validation
This commit is contained in:
parent
d302b79461
commit
7b97705c5b
|
|
@ -33,11 +33,11 @@ class CustomFieldValidationRule implements ValidationRule
|
||||||
*/
|
*/
|
||||||
public function passes($attribute, $value)
|
public function passes($attribute, $value)
|
||||||
{
|
{
|
||||||
if (!($this->validation['error_conditions']['conditions'] ?? null) || is_null(
|
$logicConditions = $this->validation['error_conditions']['conditions'] ?? null;
|
||||||
$this->validation['error_conditions']['conditions'] ?? null
|
if (empty($logicConditions) || empty($logicConditions['children'] ?? [])) {
|
||||||
)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FormLogicConditionChecker::conditionsMet(
|
return FormLogicConditionChecker::conditionsMet(
|
||||||
$this->validation['error_conditions']['conditions'],
|
$this->validation['error_conditions']['conditions'],
|
||||||
$this->formData
|
$this->formData
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue