> ## 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.

# Filter: Allow only digits

> Takes the input and makes sure all non numeric characters are removed.

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>;
};

Keeps only the digits in a value and removes everything else: letters, spaces, dashes, brackets, plus signs, and even decimal points are all stripped out, leaving the bare digits joined together. Use this to pull a clean number out of a formatted value, for example to reduce a phone number written with spaces and brackets to digits only, or to strip the letters from an order code. Because only digits remain, the result comes back as a plain number, so any leading zeros are dropped.

This documentation describes: [Schema](/schemas/mapper/string-filter-numbers)

## Fields

This mapper has no settings to configure. It always keeps the digits and removes everything else.

## Sample data

| Field         | Value |
| ------------- | ----- |
| (no settings) |       |

Input:

```json theme={null}
{ "phone": "+31 (0)20-123 45 67" }
```

Output:

```json theme={null}
{ "phone": 310201234567 }
```

```json Configuration theme={null}
{
  "prototype": "string-filter-numbers",
  "parameters": {}
}
```
