---
title: "ValidationCondition"
url: "https://developers.zinnia.com/apis/market-connect-order-entry/versions/50f981c3-db50-4358-884f-31eb427255ec/schemas/ValidationCondition"
---

> Full API specification: https://developers.zinnia.com/apis/market-connect-order-entry/versions/50f981c3-db50-4358-884f-31eb427255ec.md

# ValidationCondition

Single validation condition inside a FieldValidationRule. The shape varies by `type`: `matchesRegexCondition` uses `regex`; `numberComparisonCondition` uses `value` + `operator`; `characterCountInBetween` uses `value: { minLength, maxLength }`.

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Market Connect Order Entry API
  version: 1.0.3
servers:
  - url: https://dev.api.zinnia.io
  - url: https://qa.api.zinnia.io
  - url: https://uat.api.zinnia.io
components:
  schemas:
    ValidationCondition:
      required:
        - type
        - targetNodeId
      type: object
      properties:
        type:
          enum:
            - matchesRegexCondition
            - numberComparisonCondition
            - characterCountInBetween
          type: string
          description: The kind of validation this condition performs.
          example: matchesRegexCondition
        targetNodeId:
          type: string
          description: The answer node identifier this condition evaluates.
          example: Transaction.Beneficiaries[0].EmailAddresses["Home"].Address
        regex:
          type: string
          description: Regex pattern. Only used when `type` is `matchesRegexCondition`.
          nullable: true
          example: ^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$
        operator:
          enum:
            - lessThan
            - lessThanOrEqual
            - greaterThan
            - greaterThanOrEqual
            - equal
            - notEqual
          type: string
          description: Comparison operator. Only used when `type` is
            `numberComparisonCondition`.
          nullable: true
          example: lessThanOrEqual
        value:
          anyOf:
            - type: number
              example: 9999999999
            - type: integer
              example: 1
            - type: object
              properties:
                minLength:
                  type: integer
                  example: 0
                maxLength:
                  type: integer
                  example: 128
          description: Condition-specific value. Number for `numberComparisonCondition`;
            object `{ minLength, maxLength }` for `characterCountInBetween`.
            Absent for `matchesRegexCondition`.
      description: "Single validation condition inside a FieldValidationRule. The
        shape varies by `type`: `matchesRegexCondition` uses `regex`;
        `numberComparisonCondition` uses `value` + `operator`;
        `characterCountInBetween` uses `value: { minLength, maxLength }`."
```
