novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
35.44k stars 3.92k forks source link

fix(dashboard, api): Add stronger validation for frontend and backend workflow schemas #7055

Closed rifont closed 3 days ago

rifont commented 3 days ago

What changed? Why was the change needed?

Screenshots

Name required image

Maximum name length exceeded image

Maximum tag count exceeded image

Maximum tag length exceeded image

Textarea counter image

Expand for optional sections ### Related enterprise PR ### Special notes for your reviewer
linear[bot] commented 3 days ago

NV-4793 Unify frontend and backend validations

netlify[bot] commented 3 days ago

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
Latest commit 932152852976b360fea5c279694435b43bb5cb22
Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/673beaf16889150008fb5cbe
Deploy Preview https://deploy-preview-7055--novu-stg-vite-dashboard-poc.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

rifont commented 3 days ago

@rifont how does zod and class validation work in the new approach? Do we replicate the validation logic in both or do they complement each other?

They are replicated in both Zod + Class validators currently. This PR adds the minimum necessary BE validation for now. We need to narrow down the strategy for shared validation between the FE/BE, we'll continue that in a follow-up PR.