# 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](https://api.workflowengine.io/forms-plugin/OptimaJet.Workflow.Plugins.FormsPlugin/) ```csharp public interface IFormValidator ``` ## Methods `Task 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` | The result contains the validation result of the operation. | `Task 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` | The result contains the validation result of the operation. | [Previous GetSpecificFormParameters](https://api.workflowengine.io/forms-plugin/OptimaJet.Workflow.Plugins.FormsPlugin/GetSpecificFormParameters/) [Next ProcessForm](https://api.workflowengine.io/forms-plugin/OptimaJet.Workflow.Plugins.FormsPlugin/ProcessForm/)