Manthan933 / Manthan

Online testing platform
http://www.manthan-app.org
MIT License
88 stars 147 forks source link

Test creation Validation #84

Open JadeMaveric opened 3 years ago

JadeMaveric commented 3 years ago

Describe the bug There are multiple validation failures while creating tests.

To Reproduce Steps to reproduce the behavior:

  1. Create a new test

  2. Give it negative marks (-100)

  3. Give it negative duration (0 hours, -20 mins) (-ve hours gives a warning) image

  4. Add question, all 4 options need to be selected image

  5. Add negative no. of questions and negative marks image

  6. Press next after verifying image

  7. Check the dashboard (local build on latest master branch) image

Expected behavior Error message should be shown whenever a validation fails. And the next button blocked until the mistakes are corrected.

Desktop (please complete the following information):

kernal053 commented 3 years ago

Hey, can I work on this issue as a participant of GSSOC'21 ?

Vidisha-kayal commented 3 years ago

@kernal053 Yes, you can

kernal053 commented 3 years ago

Thank you, @Vidisha-kayal . Can any admin assign it to me ?

atulya2109 commented 3 years ago

Hi, the validations are being performed on the client side only and not on the server side. So, if instead of creating the test using the UI I send a post request to the server with marks as negative, the test will be created. Therefore, validations need to be performed server side as well and in case the validations fail, the user should be redirected accordingly

atulya2109 commented 3 years ago

@aavishkarmishra , I would like to work on this issue