Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add user-friendly validation to signup editor #138

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

PurkkaKoodari
Copy link
Member

Adds per-field validation feedback to updateSignup and shows it to the user with localization. All validation is done on the server side.

Email validation uses validator which is internally used by sequelize already.

image

@PurkkaKoodari PurkkaKoodari requested a review from a team August 14, 2024 20:51
@PurkkaKoodari PurkkaKoodari added 🌠 feature New feature - accepted for development ⚛️ components Relevant to the ilmomasiina-components package 🗄️ backend Relevant to the ilmomasiina-backend package labels Aug 14, 2024
Copy link

@MikaelSiidorow MikaelSiidorow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of manual validation logic now for the form fields (esp. updateSignup), I guess some of this could be derived from a schema or a validation library 🤔

Awesome features! 🚀

@PurkkaKoodari
Copy link
Member Author

There's a lot of manual validation logic now for the form fields (esp. updateSignup), I guess some of this could be derived from a schema or a validation library 🤔

I don't disagree, though we'd have to build a very custom schema anyway as most of the schema is part of the answers validation. Will definitely use something better for #32

@PurkkaKoodari
Copy link
Member Author

Of course, this will need duplicating into Tietokilta/web for us to benefit

@PurkkaKoodari PurkkaKoodari merged commit 3ad807b into dev Sep 8, 2024
3 checks passed
@PurkkaKoodari PurkkaKoodari deleted the feat/signup-editor-validation branch September 8, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚛️ components Relevant to the ilmomasiina-components package 🗄️ backend Relevant to the ilmomasiina-backend package 🌠 feature New feature - accepted for development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants