# Validate Credit Card Number Length to 16 Characters

**YouTube:** [How to Enforce 16 Character Credit Card Number Validation in Sale Bill?](https://www.youtube.com/watch?v=KcMcBn--BwY)

## How to Enforce 16 Character Credit Card Number Validation in Sale Bill?

This tutorial will guide you through the process of enabling a feature in Logic ERP that **validates credit card numbers to ensure they are exactly 16 characters long** during billing.

***

### Access Global Settings in Logic Admin

* Open **Logic Admin**.
* Navigate to **Global Settings**.
* Under **POS Options**, go to the **POS Options 1** section.
* Locate and enable the option labeled as:&#x20;

> **"Validate Credit Card Number Length to 16 Characters"**

<figure><img src="/files/gFy6tRk9GLKd50INgZGF" alt=""><figcaption></figcaption></figure>

* Click **Save and** **restart the software** to apply the changes.

***

### Implement **the Feature in the Billing Window**

* Open the **Sale Voucher** window.
* Start a **new transaction** and add items to the bill.
* Click **Save** to proceed to the **payment window**.
* Select **Credit Card** as the payment method.

***

#### **Test Case 1: Enter Invalid Credit Card Number**

* Enter a **credit card number that is not 16 digits long**.
* Attempt to save the transaction.
* Result:
  * An **error message** will appear:

    > “Credit card number must be 16 characters long.”

<figure><img src="/files/yO8XbpDaVkU80v0ff9GU" alt=""><figcaption></figcaption></figure>

* The system will **not allow the transaction** to proceed.

***

#### **Test Case 2: Enter Valid Credit Card Number**

* Now, enter a **valid 16-digit credit card number**.
* Save the transaction.
* Result:
  * ✔️ The payment will be **successfully accepted**.
  * No error is displayed.
  * The system confirms that the **validation is working correctly**.

***

#### **Why Use This Feature?**

* Ensures **accuracy** and **standard compliance** for credit card entries.
* Prevents **incomplete or incorrect card data** from being processed.
* Enhances **billing integrity** and **reduces transaction errors**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/user-access/logic-global-admin/pos-options/pos-options-1/validate-credit-card-number-length-to-16-characters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
