# validatestringformat: Validate String Format

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

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

- Group: Data & JSON
- Endpoint: `POST https://api.1001fx.com/data/validatestringformat`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 1 credit per call
- Ready-made in: Make and n8n
- Docs: https://1001fx.com/functions/validatestringformat

## Parameters

- `format` (enum, required, one of `vat`, `url`, `email`, `iban`, `bic`, `isbn`, `regex`) – Format: Format to validate the string.
- `input` (string, required) – Input String: The string to be validated.
- `options` (object, optional) – Options: Additional options
  - `regex` (string, optional) – Regex: Used to validate the input string. Only used if format is set to regex.
  - `countryCode` (enum, optional, one of `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`) – Country Code: 2 character country code. Only used if format is set to vat.

## Example: A valid VAT

```bash
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"}}'
```

Answer (HTTP 200):

```json
{
  "result": true
}
```
