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.
Namespace: OptimaJet.Workflow.Plugins.FormsPlugin
public interface IFormValidatorMethods
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
formKeyFormKeyThe key that uniquely identifies the form.
formValueDynamicParameterThe dynamic data of the form to be validated.
tokenCancellationTokenThe 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
formKeyFormKeyThe key that uniquely identifies the form being validated.
commandWorkflowCommandThe workflow command to be validated against the given form.
formValueDynamicParameterThe dynamic data of the form to be validated.
tokenCancellationTokenThe cancellation token.
Returns
Type
Description
Task<FormValidationResult>The result contains the validation result of the operation.