processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.3k stars 1.27k forks source link

Zod validationn added for client side #2982

Closed rahulrana701 closed 1 month ago

rahulrana701 commented 5 months ago

Fixes #2964

Changes:

I have verified that this pull request:

rahulrana701 commented 5 months ago

hi @lindapaiste I have added the zod validation for login and signup form for the client side which cleaned up a lot of code , I didn't added this validation for backend as you were not sure whether there was a validation logic for backend already , if yes I will update this pull request as per recommendations.

rahulrana701 commented 5 months ago

@lindapaiste I will solve everything by today.

rahulrana701 commented 5 months ago

hi @lindapaiste I have made some changes as you suggested.

rahulrana701 commented 4 months ago

@lindapaiste should I add this validation logic in the server side as well ??

lindapaiste commented 4 months ago

@lindapaiste should I add this validation logic in the server side as well ??

Focus on getting the front-end to work. Are you seeing the correct errors when running your branch? You haven't addressed some of the things that I pointed out so probably not.

To be honest I'm not sure where we stand on Zod right now. It can be very clean when you're just doing simple stuff like .min(1).max(20), but now that we put in the proper translations and everything it's not obvious that this is an improvement over the existing logic.

rahulrana701 commented 4 months ago

@lindapaiste, you are correct that adding translations in Zod won't be as effective since the code hasn't been cleaned up as much as we wanted. However, it still cleans up a bunch of code. This is my first time working with translations, so we might encounter some errors. I apologize for any inconvenience caused, but I'll definitely make it work for the frontend.