Workflow Engine .NET

Assembly: OptimaJet.Workflow.FormsPlugin

Interface IFormValidator

OptimaJet.Workflow.Plugins.FormsPlugin.IFormValidator

Defines the contract for validating form operations within a workflow plugin context. Provides methods to validate form-save and form-execute actions.

public interface IFormValidator

Methods

Task<FormValidationResult> ValidateSaveAsync(FormKey formKey, DynamicParameter formValue, CancellationToken token = default) #
Validates the form data and returns the validation result. This method is called when the form is saved.

Parameters

Name
Type
Description
formKey
FormKey
The key that uniquely identifies the form.
formValue
DynamicParameter
The dynamic data of the form to be validated.
token
CancellationToken
The cancellation token.

Returns

Type
Description
Task<FormValidationResult>
The result contains the validation result of the operation.
Task<FormValidationResult> ValidateExecuteAsync(FormKey formKey, WorkflowCommand command, DynamicParameter formValue, CancellationToken token = default) #
Validates the execution of a form command and returns the validation result.

Parameters

Name
Type
Description
formKey
FormKey
The key that uniquely identifies the form being validated.
command
WorkflowCommand
The workflow command to be validated against the given form.
formValue
DynamicParameter
The dynamic data of the form to be validated.
token
CancellationToken
The cancellation token.

Returns

Type
Description
Task<FormValidationResult>
The result contains the validation result of the operation.