Метод validateAction
Сигнатура метода
public function validateAction(ValidateFormRequest $request): ValidationResponse
Возвращает:
ValidationResponse
Описание
`crm.form.validate`: answers whether a write would take the form, and what it would object to. Nothing is written and no version moves, yet the refusals travel through {@see runWrite()} with those of the writes. A check is a dry run of a write and raises the refusals of one - no right to change forms, no such form, a document breaking the write contract - and a refusal means the same wherever it was raised. A table of its own here would let one refusal reach a client as two different answers, which is what that single table exists to prevent. Violations of the rules are not refusals and do not come through there: they are the answer itself, carried in the result and put into the response whatever the verdict. The write the document is read as is the write it is a dry run of: a document naming no form is the document of a creation that has not happened yet, and one sent on top of a stored form is the document of a change. Read in the other context, the check would take what the write it stands for refuses, or refuse what that write takes.
Параметры
1| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$request
|
ValidateFormRequest
|
—
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulescrm/lib/V2/Infrastructure/Rest/Controller/Form/Form.php