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

Add validation of number input (to c1, possibly other pages) #156

Open
lady3bean opened this issue Jan 29, 2020 · 1 comment
Open

Add validation of number input (to c1, possibly other pages) #156

lady3bean opened this issue Jan 29, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@lady3bean
Copy link

parseFloat() is being used to parse the number input on the c1 step, which may not end up with the right result because of how permissive this function is. Instead, we should have a front end validation to get the user to input numbers only.

There may be other inputs where the same thing is happening, so might be a good idea to audit the app for these and use the validation on all of them.

@thadk
Copy link
Member

thadk commented Jul 5, 2020

Welcome to propose a suggestion for this!

Since this suggestion was made we've cleaned up our state management so it should be easier to do something like this in src/library/user-state-manager.tsx as the values are being set.

We might need to come up with a new way to bubble up the warnings to the UI consistently though.

@thadk thadk added the good first issue Good for newcomers label Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants