> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Is valid credit card number

> Checks if the value is a valid credit card number.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Checks whether the incoming value is a valid credit card number. A value passes when it looks like a card number from one of the major brands (Visa, Mastercard, American Express, Diners Club, Discover, or JCB) and its check digit adds up correctly, so a typo in a single digit is caught. Use this to confirm a card field holds a plausible number before you send it on, or to route records with a missing or malformed number down a different path. The check only looks at the format of the number itself; it does not contact any payment provider or confirm the card actually exists. Supply the number as digits with no spaces or dashes.

This documentation describes: [Schema](/schemas/condition/format-credit-card)

## Fields

This condition has no fields to configure. It checks the value it receives and answers yes or no.

## Sample data

The condition was run against a card field with no extra settings.

| Incoming value                         | Result         |
| -------------------------------------- | -------------- |
| `4111111111111111` (valid Visa number) | Matches        |
| `1234567890`                           | Does not match |

```json Configuration theme={null}
{
  "prototype": "format-credit-card",
  "parameters": {}
}
```
