-
Notifications
You must be signed in to change notification settings - Fork 38
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
Question should more than one word #54
Comments
Hi, could you assign this issue to me? |
Seems you can use https://valibot.dev/api/includes/, it should include a Pipes with current validation https://github.com/mazipan/tanyaaja/blob/master/src/modules/PublicQuestionPage/QuestionForm.tsx#L31-L33 Error message: Just create a Draft Pull Request first to assign your self |
Sure, will do! thanks |
Closes #54 ## Description - Added validation using Valibot to ensure that a space character is included in the question - Ran pnpm run format then pnpm run lint --fix to auto format the code - Tested the validation from local - Resolved merge conflict ## Testing - [ Test new validation on local - test one word question produces correct error message ] (test 1) ![image](https://github.com/mazipan/tanyaaja/assets/98062538/6aeba565-b5d1-4a3b-a354-1773c5e06a56) - [ Test new validation on local - test two word question goes through and appears in DB ] (test 2) ![test2-1](https://github.com/mazipan/tanyaaja/assets/98062538/159fd179-0fee-47c8-a98e-90e1f2518699) ![test2-2](https://github.com/mazipan/tanyaaja/assets/98062538/48170796-6882-4b6d-9f35-9c28f5cfb043) - [ Test existing validation on local - test blank question produces error ] (test 3) ![test3](https://github.com/mazipan/tanyaaja/assets/98062538/deb6f02e-d8ea-42c0-9942-d9169d415d19)
Describe the bug
Some people just testing the TanyaAja by submitting "one word" question such as "test", "testing", etc. This kind of action should not allowed from the first place.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Question should not submitted, and show error message that we are not allowing this kind of action due to it's not seems as a honest question
Additional context
Add new validation rule using
Valibot
to check "one word" question, if possibleThe text was updated successfully, but these errors were encountered: