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

# Logic: And

> Checks that all conditions match.

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

Matches only when every condition you list is satisfied. Use this to combine several checks into one rule where the data has to pass all of them at once, for example "the quantity is more than 0 *and* less than 100". Each condition you add looks at the same value, and the whole rule passes only when none of them fail. If you do not add any conditions, the rule always passes.

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

## Fields

<FormField property="conditions[]" label="Conditions" diType="condition">
  The list of checks that must all be satisfied. Add as many as you need; the value passes only when every one of them matches. Each entry is another condition you pick and configure, such as an equality check or a number comparison. You can nest combinations, for example an "And" that contains an "Or", to build more detailed rules.
</FormField>

## Sample data

This rule combines two checks on an order's `quantity`: it must be greater than 0 **and** less than 100. The quantity matches only when both checks pass.

| Field            | Value                   |
| ---------------- | ----------------------- |
| First condition  | Number greater than `0` |
| Second condition | Number less than `100`  |

| Quantity | Greater than 0? | Less than 100? | Matches? |
| -------- | --------------- | -------------- | -------- |
| `5`      | yes             | yes            | yes      |
| `0`      | no              | yes            | no       |
| `250`    | yes             | no             | no       |

```json Configuration theme={null}
{
  "prototype": "logic-and",
  "parameters": {
    "conditions": [
      { "prototype": "number-greater-than", "parameters": { "value": 0 } },
      { "prototype": "number-less-than", "parameters": { "value": 100 } }
    ]
  }
}
```
