Badgeyay: Add error info to specific field and include details

Created on 22 Oct 2017  路  6Comments  路  Source: fossasia/badgeyay

When a user enters data that is not correct entered and hits "Upload" a general error message appears. Please make this easier to understand and add more information.

  1. Highlight the box that was erroneous in red and add info that it is erroneous
  2. Keep the information that was previously entered in all fields
  3. Provide a helper text how the information should be correctly formatted

screenshot from 2017-10-22 17-42-54

See screenshot above. The user does not know what is the correct format. There is no info anywhere what the correct format is like.

Enhancement

Most helpful comment

@jajodiaraghav @S2606 @gabru-md How about doing form validation using javascript in the client side itself rather than in server side. This way displaying error will be more flexible. We just need to add a function for form validation and the entire validation code will remain separate. There will be no need of message passing between server and client via flash. This will also clean up the server side code (main.py) as well as index.html as we can get rid of the flask template syntaxes in many of the places. Also presently when an error is detected, the page is reloaded, and the previous inputs are gone. If we use JS, then previous inputs will remain and also we need not reload the page. What do you guys think? Should I follow this approach ?

All 6 comments

I would like to work on this :)

@djmgit are you working on this issue?

@pushkalkatara Yes I am working on this, was busy last few days, I will submit a PR by this weekend for sure :)

@jajodiaraghav @S2606 @gabru-md How about doing form validation using javascript in the client side itself rather than in server side. This way displaying error will be more flexible. We just need to add a function for form validation and the entire validation code will remain separate. There will be no need of message passing between server and client via flash. This will also clean up the server side code (main.py) as well as index.html as we can get rid of the flask template syntaxes in many of the places. Also presently when an error is detected, the page is reloaded, and the previous inputs are gone. If we use JS, then previous inputs will remain and also we need not reload the page. What do you guys think? Should I follow this approach ?

@djmgit this is really a nice approach and i insist that it must be implemented as it will reduce the load on server side as well ( just like you said ) and the problem of previous lost can also be tackled using this.
Great thoughts @djmgit
I feel you should do it. :+1:
What do you guys say @jajodiaraghav @vaibhavsingh97 @S2606 @mariobehling ? please comment.

depends on #309

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mariobehling picture mariobehling  路  7Comments

yashLadha picture yashLadha  路  3Comments

vaibhavsingh97 picture vaibhavsingh97  路  8Comments

ParthS007 picture ParthS007  路  6Comments

rupav picture rupav  路  7Comments