GrafeasGroup / blossom

The website. The app. The everything.
6 stars 3 forks source link

Remove JQuery from form validation code #160

Closed TimJentzsch closed 3 years ago

TimJentzsch commented 3 years ago

Relevant issue: N/A

Description:

This removes the JQuery used in the form validation code in #159. The functionality should be identical, to the best of my knowledge.

I also removed a potential attack vector for script injection and handling in case that the forms don't have the expected structure.

If we are to proceed with this, first move this PR and then #159.

Checklist:

itsthejoker commented 3 years ago

If I submit an empty form, all of the errors show up, but it also nukes all of the form input labels:

![image](https://user-images.githubusercontent.com/5179553/122703134-e3f0e800-d21e-11eb-9ca3-9e1fbdd347fd.png)

Expected behavior from #159

![image](https://user-images.githubusercontent.com/5179553/122703308-421dcb00-d21f-11eb-896e-bd39a4c2dd75.png)
TimJentzsch commented 3 years ago

Breaks on error rendering -- see above screenshots for details

Good catch -- should be fixed now!