Skip to content

[FEATURE] Support additional validation for user props #1202

Open
@jverce

Description

@jverce

Is your feature request related to a problem? Please describe.
Validating user props when setting them up would be very useful since we would detect any issues earlier and avoid deploying faulty components. So far we have certain validations like type, min, max, etc. but in some cases the validation logic can be more complex (e.g. validating a string against a regex), and it'd be nice to catch any errors when setting up those props instead of doing it during the deploy/activation phase

Describe the solution you'd like
A couple of solutions have been proposed:

  • Specifying the accepted data format/type via additional JSON schemas. In this case, the validation could be implemented in the client and the validation logic be computed there.
  • Speciyfing a method (or list of methods) that takes in the provided value and throws an exception or returns some message when the value does not pass the validation.

Do you have a workaround?
Right now, the workaround is to do the checks during the Activation phase (i.e. within the scope of the activate() hook)

Comparable features in other tools?
Zapier for example has validation when setting up a zap:
zapier_email_validation

Additional context
Slack discussion thread: https://pipedream-users.slack.com/archives/CMN2V5EAF/p1619666621039700

Metadata

Metadata

Assignees

No one assigned

    Labels

    component eeComponent execution environmentenhancementNew feature or requesttracked internallyIssue is also tracked in our internal issue trackertriagedFor maintainers: This issue has been triaged by a Pipedream employee

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions