> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spojit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validation Tools

> Validate emails, URLs, phone numbers, credit cards, IP addresses, and more.

The Validation Tools connector checks data against common formats and rules: emails, URLs, phone numbers, credit cards, and many more.

<Note>No connection required; this utility connector works out of the box.</Note>

## Tools

<AccordionGroup>
  <Accordion title="email: Validate email address">
    <ParamField body="email" type="string" required>
      Email address to validate.
    </ParamField>

    <ParamField body="allowDisplayName" type="boolean" default="false">
      Allow display name format (e.g., `John <john@example.com>`).
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "email": "jane.doe@company.com" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "jane.doe@company.com"
    }
    ```
  </Accordion>

  <Accordion title="url: Validate URL">
    <ParamField body="url" type="string" required>
      URL to validate.
    </ParamField>

    <ParamField body="protocols" type="string[]" default="[&#x22;http&#x22;, &#x22;https&#x22;]">
      Allowed protocols.
    </ParamField>

    <ParamField body="requireProtocol" type="boolean" default="true">
      Require a protocol prefix.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "url": "https://api.example.com/v2/users?page=1", "requireProtocol": true }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "https://api.example.com/v2/users?page=1"
    }
    ```
  </Accordion>

  <Accordion title="phone: Validate phone number">
    <ParamField body="phone" type="string" required>
      Phone number to validate.
    </ParamField>

    <ParamField body="locale" type="string">
      Locale (e.g., `en-US`).
    </ParamField>

    <ParamField body="strictMode" type="boolean" default="false">
      Strict validation.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "phone": "+14155552671", "locale": "en-US" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "+14155552671"
    }
    ```
  </Accordion>

  <Accordion title="credit-card: Validate credit card number">
    <ParamField body="number" type="string" required>
      Card number.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "number": "4111111111111111" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "4111111111111111"
    }
    ```
  </Accordion>

  <Accordion title="ip: Validate IP address">
    <ParamField body="ip" type="string" required>
      IP address to validate.
    </ParamField>

    <ParamField body="version" type="string" default="any">
      IP version: `4`, `6`, or `any`.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "ip": "192.168.1.100", "version": "4" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "192.168.1.100",
      "version": 4
    }
    ```
  </Accordion>

  <Accordion title="uuid: Validate UUID">
    <ParamField body="uuid" type="string" required>
      UUID to validate.
    </ParamField>

    <ParamField body="version" type="string" default="any">
      UUID version: `1`, `2`, `3`, `4`, `5`, or `any`.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "uuid": "not-a-uuid-string", "version": "4" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": false,
      "input": "not-a-uuid-string"
    }
    ```
  </Accordion>

  <Accordion title="json: Validate JSON">
    <ParamField body="json" type="string" required>
      String to validate.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "json": "{\"name\": \"Alice\", \"age\": 30}" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "error": null
    }
    ```
  </Accordion>

  <Accordion title="iso-date: Validate ISO 8601 date">
    <ParamField body="date" type="string" required>
      Date string to validate.
    </ParamField>

    <ParamField body="strict" type="boolean" default="false">
      Strict ISO 8601 validation.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "date": "2025-06-15T14:30:00Z", "strict": true }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "2025-06-15T14:30:00Z",
      "parsed": "2025-06-15T14:30:00.000Z"
    }
    ```
  </Accordion>

  <Accordion title="alphanumeric: Check alphanumeric">
    Check if text contains only letters and numbers.

    <ParamField body="text" type="string" required>
      Text to check.
    </ParamField>

    <ParamField body="locale" type="string" default="en-US">
      Locale.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "text": "Order123ABC" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "Order123ABC"
    }
    ```
  </Accordion>

  <Accordion title="numeric: Check numeric">
    Check if text contains only numbers.

    <ParamField body="text" type="string" required>
      Text to check.
    </ParamField>

    <ParamField body="noSymbols" type="boolean" default="false">
      Disallow `+`, `-`, and `.`.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "text": "12345", "noSymbols": true }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "12345"
    }
    ```
  </Accordion>

  <Accordion title="hex-color: Validate hex colour">
    <ParamField body="color" type="string" required>
      Colour code to validate (e.g., `#FF8F28`).
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "color": "#FF8F28" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "#FF8F28"
    }
    ```
  </Accordion>

  <Accordion title="mac-address: Validate MAC address">
    <ParamField body="mac" type="string" required>
      MAC address to validate.
    </ParamField>

    <ParamField body="noSeparators" type="boolean" default="false">
      Allow MAC addresses without separators.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "mac": "00:1A:2B:3C:4D:5E" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "00:1A:2B:3C:4D:5E"
    }
    ```
  </Accordion>

  <Accordion title="slug: Validate URL slug">
    <ParamField body="slug" type="string" required>
      Slug to validate.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "slug": "my-blog-post-title" }
    ```

    **Example response:**

    ```json theme={null}
    {
      "valid": true,
      "input": "my-blog-post-title"
    }
    ```
  </Accordion>

  <Accordion title="password-strength: Check password strength">
    <ParamField body="password" type="string" required>
      Password to check.
    </ParamField>

    <ParamField body="minLength" type="number" default="8">
      Minimum length.
    </ParamField>

    <ParamField body="minLowercase" type="number" default="1">
      Minimum lowercase characters.
    </ParamField>

    <ParamField body="minUppercase" type="number" default="1">
      Minimum uppercase characters.
    </ParamField>

    <ParamField body="minNumbers" type="number" default="1">
      Minimum numeric characters.
    </ParamField>

    <ParamField body="minSymbols" type="number" default="0">
      Minimum symbol characters.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "password": "MyP@ss1", "minLength": 8, "minSymbols": 1 }
    ```

    **Example response:**

    ```json theme={null}
    {
      "strong": false,
      "checks": {
        "length": false,
        "lowercase": true,
        "uppercase": true,
        "numbers": true,
        "symbols": true
      }
    }
    ```
  </Accordion>

  <Accordion title="is-empty: Check if empty">
    <ParamField body="text" type="string" required>
      Text to check.
    </ParamField>

    <ParamField body="ignoreWhitespace" type="boolean" default="true">
      Treat whitespace-only as empty.
    </ParamField>

    **Example request:**

    ```json theme={null}
    { "text": "   ", "ignoreWhitespace": true }
    ```

    **Example response:**

    ```json theme={null}
    {
      "empty": true,
      "length": 3
    }
    ```
  </Accordion>
</AccordionGroup>
