---
title: Consistent Casing
description: Validates that text values follow a consistent casing format such as Pascal Case, camelCase, or snake_case.
group: Consistency
---

# Consistent Casing

The **Consistent Casing** rule ensures text data is consistently formatted according to a specified casing standard within a dataset.  
This rule is commonly used to:

- Standardize names, labels, or codes to a defined casing convention.
- Prevent issues in downstream processes caused by inconsistent text formatting.

**Example Usage**:  
Check that all customer names follow `Pascal Case` (e.g., `JohnDoe`, `JaneSmith`) and country codes follow `snake_case` (e.g., `united_states`, `great_britain`).

---

## Configuration Fields  

### Rule-Specific Configuration  

| Field Name      | Description                                            | Required | Data Type / Options |
|:----------------|:-------------------------------------------------------|:-----------|:--------------------|
| **Case Type**    | Casing format to validate against                      | Yes       | `Upper Case`, `Lower Case`, `Title Case`, `Sentence Case`, `camelCase`, `PascalCase`, `kebab-case`, `snake_case` |

---

### Success Criteria Configuration  

This section defines how the rule’s outcome is measured against expected thresholds.

| Field Name        | Description                                                  | Required | Options / Format |
|:------------------|:-------------------------------------------------------------|:-----------|:-----------------|
| **Operator**        | Comparison operation for the result count                    | Yes       | `GreaterThan`, `LessThan`, `EqualTo`, `Between` |
| **Threshold Value** | Value for comparison (for `GreaterThan`, `LessThan`, `EqualTo`) | Conditional| Number |
| **Threshold Min**   | Minimum value (for `Between` operator)                        | Conditional| Number |
| **Threshold Max**   | Maximum value (for `Between` operator)                        | Conditional| Number |
| **Is Percentage**   | Whether the threshold represents a percentage or an absolute count | No        | `true` / `false` (default: `false`) |
| **Allow Nulls**     | Whether null values are considered valid                     | No        | `true` / `false` (default: `false`) |
| **Check For Match** | When `false`, validates for negation of the condition         | No        | `true` / `false` (default: `true`) |

---

## Sample Input Data  

| ID | Customer       | Country       |
|:----|:----------------|:---------------|
| 1  | Fallon          | greatBritain    |
| 2  | FranklynFryer   | France          |
| 3  | Kathleen        | unitedStates    |
| 4  | JudieGreen      |                 |
| 5  | JohnDoe         | France          |

---

## Sample Configurations  

### Example 1: Customer Name Pascal Case Check  



| Configuration Field | Value         |
|:---------------------|:---------------|
| Column                | Customer        |
| Case Type              | PascalCase       |
| Operator              | GreaterThan    |
| Threshold Value       | 75             |
| Is Percentage         | true           |
| Allow Nulls           | false          |
| Check For Match       | true           |

**Explanation**:  
Validates that at least 75% of customer names are in PascalCase.

---

### Example 2: Country Lower Case Check  



| Configuration Field | Value         |
|:---------------------|:---------------|
| Column                | Country         |
| Case Type              | Lower Case      |
| Operator              | GreaterThan     |
| Threshold Value       | 60              |
| Is Percentage         | true            |
| Allow Nulls           | false           |
| Check For Match       | true            |

**Explanation**:  
Validates that at least 60% of country names are in lower case.

---

## Sample Output  

| Column Name | Rule Name          | Success Count | Failure Count | Null Count | Within Threshold |
|:------------|:-------------------|:---------------|:---------------|:------------|:------------------|
| Customer     | Consistent Casing   | 5             | 0             | 0          | Yes               |
| Country      | Consistent Casing   | 2             | 3             | 1          | No                |

---
