1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

data → Validate String Format

AI-generated

Overview

The Validate String Format operation in the "data" resource of this n8n node allows you to check if a given string matches a specified format. Supported formats include common types such as email, URL, IBAN, ISBN, BIC, VAT numbers (with country code), and custom regular expressions. This is useful for data validation workflows, ensuring that user input or imported data conforms to expected standards before further processing.

Practical examples:

  • Validating user-submitted email addresses before adding them to a mailing list.
  • Checking if a bank account number is a valid IBAN.
  • Ensuring product codes match an ISBN format.
  • Verifying VAT numbers with country-specific rules.
  • Using a custom regex to enforce specific string patterns.

Properties

Name Meaning
Format Format to validate the string. Options: bic, email, iban, isbn, regex, url, vat.
Input String The string to be validated.
Options Input Mode How additional options are provided. Options: Expression (enter JSON directly), Manual (use form fields).
Options Additional options depending on the selected format and input mode:
- If using regex: specify the regular expression.
- If using vat: specify the 2-character country code (e.g., AT, DE, FR, etc.).

Output

  • The output will be a JSON object containing the result of the validation.
  • Typical structure:
    {
      "isValid": true,
      "input": "example@domain.com",
      "format": "email"
    }
    
  • If validation fails, isValid will be false.
  • For errors, the output may contain an error field with details about what went wrong.

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: You must configure the 1001fxApi credential in n8n.
  • Environment: No special environment variables required beyond standard n8n setup.

Troubleshooting

Common Issues:

  • Invalid API Key: If your credentials are incorrect, the node will return an authentication error. Ensure your 1001fxApi credential is set up properly.
  • Incorrect Format/Options: If you select regex but do not provide a valid regular expression, or if you select vat without specifying a country code, the validation will fail.
  • Malformed Input: If the input string is empty or not a string, the node may return an error or mark the input as invalid.

Error Messages:

  • "error": "Missing required parameter" – Make sure all required fields are filled.
  • "error": "Invalid format" – Check that the format and any associated options (like regex or country code) are correct.
  • "error": "Request failed with status code 401" – Indicates authentication issues; verify your API key.

Links and References

Discussion