setScriptConstraints example

$this->buildViolation(
                    'The property "{{ fieldName }}" is not allowed.',
                    ['{{ fieldName }}' => $missingProperty],
                    '/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()));
        }
Home | Imprint | This part of the site doesn't use cookies.