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

# Check conditions on mapped value

> Applies mappers to the data and checks all conditions on the result.

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

Reshapes a value first, then runs your conditions against the reshaped result. Use this when the value you actually want to test is not the value you start with, for example lower-casing a status before comparing it so that `ACTIVE`, `Active`, and `active` are all treated the same, or trimming stray spaces before a check. The conversions run first, in order, and then every condition is checked against the final converted value.

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

## Fields

<FormField property="mappers" label="Conversions" diType="mapper">
  The conversions applied to the value before anything is checked, run one after another. Each one transforms the value and hands its result to the next, so you can chain several steps together. The conditions below run against the final result of these conversions.
</FormField>

<FormField property="conditions" label="Conditions" diType="condition">
  The checks run against the converted value. Every condition must pass for the overall result to be true; if any one of them fails, the result is false. Leaving this empty makes the overall result always true.
</FormField>

## Sample data

Here the value is lower-cased first, then checked against the text `active`. Because the conversion runs first, mixed-case input still matches.

| Field       | Value           |
| ----------- | --------------- |
| Conversions | Lowercase text  |
| Conditions  | Equals `active` |

| Value      | Result         |
| ---------- | -------------- |
| `ACTIVE`   | Matches        |
| `Archived` | Does not match |

```json Configuration theme={null}
{
  "prototype": "mapped-condition",
  "parameters": {
    "mappers": [
      { "prototype": "string-lower", "parameters": {} }
    ],
    "conditions": [
      { "prototype": "equals", "parameters": { "value": "active" } }
    ]
  }
}
```
