Skip to content
Browse all functions

Validate String Format

data/validatestringformat

validatestringformat (Validate String Format) is a 1001fx API function in the group Data & JSON: POST https://api.1001fx.com/data/validatestringformat, 1 credit per call. It works as a ready-made module in Make and n8n or as a plain HTTP call.

1 credit per callHTTP APIn8nMake

Validates if a given string is in provided format. Formats are :URL, email, IBAN, BIC, VAT, ISBN and Regular Expresssion.

Try it in the 1001fx app

Run validatestringformat in your browser with your API key – fill the form, click Run and get the answer or the file.

validatestringformat in the 1001fx app: the form with example values
Validate String Format in the 1001fx app

Endpoint

POSThttps://api.1001fx.com/data/validatestringformat
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
application/json

Parameters

  • formatenumrequired

    Format to validate the string.

    Values:
    vat
    url
    email
    iban
    bic
    isbn
    regex
    Example:
    url
  • inputstringrequired

    The string to be validated.

    Example:
    853746333B01
  • optionsobjectoptional

    Additional options

    • regexstringoptional

      Used to validate the input string. Only used if format is set to regex.

      Example:
      ^[0-9]*$
    • countryCodeenumoptional

      2 character country code. Only used if format is set to vat.

      Values:
      AT
      BE
      BG
      HR
      CY
      CZ
      DK
      EE
      FI
      FR
      DE
      EL
      HU
      IE
      IT
      LV
      LT
      LU
      MT
      NL
      PL
      PT
      RO
      SK
      SI
      ES
      SE
      XI
      Example:
      DE

Examples

A valid VAT

Returns true for a valid VAT

Input

Expects a json body
{
  "input": "853746333B01",
  "format": "vat",
  "options": {
    "countryCode": "NL"
  }
}

Output · HTTP 200

Response
{
  "result": true
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"853746333B01","format":"vat","options":{"countryCode":"NL"}}'

A valid Email

Returns true for a valid Email

Input

Expects a json body
{
  "input": "hello@1001fx.com",
  "format": "email"
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"hello@1001fx.com","format":"email"}'

A valid IBAN

Returns true for a valid IBAN

Input

Expects a json body
{
  "input": "DE27123412341234123412",
  "format": "iban"
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"DE27123412341234123412","format":"iban"}'

A valid ISBN-10

Returns true for a valid ISBN-10

Input

Expects a json body
{
  "input": "0-545-01022-5",
  "format": "isbn"
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"0-545-01022-5","format":"isbn"}'

A valid ISBN-13

Returns true for a valid ISBN-13

Input

Expects a json body
{
  "input": "978-3-89721-760-7",
  "format": "isbn"
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"978-3-89721-760-7","format":"isbn"}'

A valid URL

Returns true for a valid URL

Input

Expects a json body
{
  "input": "https://1001fx.com",
  "format": "url"
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"https://1001fx.com","format":"url"}'

Regex: matching input

Returns true: "1236712" matches ^[0-9]*$.

Input

Expects a json body
{
  "input": "1236712",
  "format": "regex",
  "options": {
    "regex": "^[0-9]*$"
  }
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"1236712","format":"regex","options":{"regex":"^[0-9]*$"}}'

Regex: non-matching input

Returns false: "1236712a" does not match ^[0-9]*$.

Input

Expects a json body
{
  "input": "1236712a",
  "format": "regex",
  "options": {
    "regex": "^[0-9]*$"
  }
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"1236712a","format":"regex","options":{"regex":"^[0-9]*$"}}'

A valid BIC

Returns true for a valid BIC

Input

Expects a json body
{
  "input": "DEUTDEFFXXX",
  "format": "bic"
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/validatestringformat' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"DEUTDEFFXXX","format":"bic"}'

Try validatestringformat now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.028.02.2023created
Ask 1001fx