sfbrigade / bats-server

Routed is an app to help ambulances direct non-critical patients to hospital emergency rooms with the most availability.
https://routedapp.org/
GNU Affero General Public License v3.0
18 stars 11 forks source link

App should handle Login form validation in a more React-friendly way #320

Open francisli opened 9 months ago

francisli commented 9 months ago

The migration of the Login/Forgot Password/2FA/Reset Password flows into the SPA resulted in some old JavaScript DOM related code being reused- particularly, in client/src/Auth/Components/helperFunctions.js.

These helper functions are being used to perform field validation, manipulating the DOM directly.

I think this should all be refactored into a more React-friendly implementation.

fwextensions commented 9 months ago

I haven't investigated this code, but it might be possible to use the native HTML input validation as well.