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

# String: Contains only alphanumeric characters

> Checks that a string contains only alphanumeric characters.

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 that a string contains only alphanumeric characters. A value passes when every character is either a letter or a digit, with nothing else in between. Use this to confirm that a code or identifier is clean before you act on it, for example to keep only product SKUs or reference codes that have no spaces, dashes, or punctuation. Letters from any language count as letters (including accented ones such as `é` or `ü`), and an empty value is treated as matching because it has no disallowed characters. Spaces are not allowed, so a value with a space in it does not match.

This documentation describes: [Schema](/schemas/condition/string-alnum)

## Fields

This condition has no settings to configure. It always checks the value it is given and passes when every character is a letter or a digit.

## Sample data

The condition checks each value and answers yes or no:

| Example value | Matches?              |
| ------------- | --------------------- |
| `Order42`     | Yes                   |
| `Order 42`    | No (contains a space) |
| `SKU-001`     | No (contains a dash)  |

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