# FLOW_ClearValidationBypass

**Class** · Group: `Validation`

Learn it: [Validation guide](/validation-guide)

<div class="apex-member apex-class">

```apex
global inherited sharing class FLOW_ClearValidationBypass
```

Flow invocable action to clear validation rule bypasses for the current transaction. Use this after DML operations in Flow to explicitly clear bypasses set by FLOW_BypassValidation. Important: While bypasses are automatically cleared at the end of the transaction, explicitly clearing them after DML improves code clarity and prevents accidental bypass of subsequent validation in the same transaction.

**Example**

`// Flow Configuration - Clear specific bypass: Action: Clear Validation Bypass Input: ` Name: Account // Flow Configuration - Clear all bypasses: Action: Clear Validation Bypass Input: `ClearAll: true `

**See Also:** [UTIL_ValidationRule](/reference/apex/util-validationrule), [FLOW_BypassValidation](/reference/apex/flow-bypassvalidation)

</div>

---

## Methods

| Method | Description |
|--------|-------------|
| global static void [clearBypass](#clearbypass)([List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm)<[FLOW_ClearValidationBypass.DTO_Request](/reference/apex/flow-clearvalidationbypass-dto-request)> requests) | Clears validation rule bypasses for the current transaction. |

### clearBypass

<div class="apex-member">

```apex
@InvocableMethod(category='Validation' description='Clears validation rule bypasses for an object, group, or specific rule for the current transaction.' label='Clear Validation Bypass') global static void clearBypass(List<FLOW_ClearValidationBypass.DTO_Request> requests)
```

Clears validation rule bypasses for the current transaction.
If clearAll is true, all active bypasses are removed. Otherwise, the specified
name is removed from all bypass lists (object, group, and rule).

**Parameters**

| Parameter | Type | Description |
|-----------|------|-------------|
| `requests` | [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm) | List of clear bypass requests |

**Example**

```apex
// Clear Account bypass
FLOW_ClearValidationBypass.DTO_Request request = new FLOW_ClearValidationBypass.DTO_Request();
request.name = 'Account';
FLOW_ClearValidationBypass.clearBypass(new List<FLOW_ClearValidationBypass.DTO_Request>{request});
```

</div>

## Inner Classes

| Class | Description |
|-------|-------------|
| [DTO_Request](/reference/apex/flow-clearvalidationbypass-dto-request) | Request DTO for the Clear Validation Bypass invocable action. |

---
