Appwrite Helper icon

Appwrite Helper

Utility node for building Appwrite queries, permissions, and schemas

Overview

The Appwrite Helper node provides utility functions for working with Appwrite, including building queries, permissions, and schemas. Specifically, the 'Validate ID' operation allows users to validate an ID string against various patterns such as Appwrite constraints, UUID v4, Nanoid, slug, alphanumeric, or numeric formats. This is useful for ensuring that IDs conform to expected formats before using them in Appwrite operations or other workflows.

Use Case Examples

  1. Validating a document ID to ensure it meets Appwrite's 36-character alphanumeric constraints before querying a database.
  2. Checking if a user-provided ID matches the UUID v4 format to prevent errors in API calls.
  3. Ensuring a slug used in URLs is URL-friendly by validating it with the slug pattern.

Properties

Name Meaning
ID to Validate The ID string that needs to be validated.
Validation Pattern The pattern against which the ID will be validated, such as Appwrite constraints, UUID v4, Nanoid, slug, alphanumeric, or numeric.

Output

JSON

  • isValid - Boolean indicating if the ID passed the validation.
  • validationPattern - The pattern used for validation.
  • idToValidate - The original ID string that was validated.

Dependencies

  • Requires no external API or credentials; validation is performed internally.

Troubleshooting

  • If the ID does not meet the selected validation pattern, the node will return isValid as false. Ensure the ID format matches the chosen pattern.
  • Common errors may include invalid input types or empty strings; verify that the 'ID to Validate' property is correctly set and not empty.

Discussion