Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make form submission verification and errors happen in real time using js framework; not when just submitted #191

Open
DGKSK8LIFE opened this issue May 8, 2020 · 2 comments

Comments

@DGKSK8LIFE
Copy link

No description provided.

@roymoran
Copy link
Member

roymoran commented May 8, 2020

i like this idea, what do you think @aaron2212. Only thing i'd consider is that we will have to duplicate validation logic for both the frontend and backend. In scenarios where the validation rules change - where does the single source of truth come from? We could also consider only validating on frontend but this seems like although you'd have to question the integrity of the data being persisted. Anyways would be nice to be thoughtful however we decide to go about it.

@DGKSK8LIFE
Copy link
Author

i like this idea, what do you think @aaron2212. Only thing i'd consider is that we will have to duplicate validation logic for both the frontend and backend. In scenarios where the validation rules change - where does the single source of truth come from? We could also consider only validating on frontend but this seems like although you'd have to question the integrity of the data being persisted. Anyways would be nice to be thoughtful however we decide to go about it.

You could just do validation with regex on the frontend with react or whatever. Would be much easier and with react apps, the user couldn't just edit the source and send fraudulent requests. And the data wouldn't need to be persisted? The requests, if validated, would happen after a button press, it's just the validation would be in real time. Ok Ty!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants