sdevalapurkar / schedulearn

📅 A web app that tutors can use to manage their students and schedule lessons
http://www.schedulearn.com
3 stars 3 forks source link

Add frontend form validation wherever possible #141

Open AhmedNSidd opened 5 years ago

AhmedNSidd commented 5 years ago

A good point was brought up by @sdevalapurkar in #133 that we're doing backend error checking for simple form validation like empty forms. We should try avoiding this and add more frontend error checking too. This is probably going to be a long issue to resolve. This issue may be related to a potential issue in the future which is that we're not using Django Forms, and maybe we should be. Read more about it here. If anyone has good resources on best ways to do error checking in general when it comes to a web app then that'd be appreciated.

Considering this is a high-effort, low-reward deal on the user's side I would say this is a low priority but eventually something that would be good to look into to fix if someone has time.

AhmedNSidd commented 5 years ago

https://stackoverflow.com/questions/162159/javascript-client-side-vs-server-side-validation

sdevalapurkar commented 5 years ago

that link is very accurate, like I mentioned in the 133 pr, we need to keep all validation checks etc in backend for security reasons but frontend checks should be added to improve user experience and wait times for server responses