validateConsistence example

'/value/' . $missingProperty
                )
            );
        }

        $ruleInstance->assign($value);

        if ($ruleInstance instanceof ScriptRule) {
            $this->setScriptConstraints($ruleInstance$condition$payload$context);
        }

        $this->validateConsistence(
            $ruleInstance->getConstraints(),
            $value,
            $violationList,
            $missingProperties
        );

        if ($violationList->count() > 0) {
            $writeException->add(new WriteConstraintViolationException($violationList$command->getPath()));
        }
    }

    
'This "_name" value (%value%) is invalid.',
                    ['%value%' => 'NULL'],
                    $basePath . '/_name'
                )
            );
        } else {
            $rule = $this->ruleConditionRegistry->getRuleInstance($type);
            // do not validate container             if (!$rule instanceof Container) {
                $rule->assign($data);
                $validations = $rule->getConstraints();
                $violationList->addAll($this->validateConsistence($basePath$validations$data));
            }
        }

        if (\array_key_exists('rules', $data)) {
            foreach ($data['rules'] as $rule) {
                $violationList->addAll($this->validateRules($rule$basePath . '/' . $type));
            }
        }

        return $violationList;
    }

    
Home | Imprint | This part of the site doesn't use cookies.