windfall-elimination icon indicating copy to clipboard operation
windfall-elimination copied to clipboard

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

Open lady3bean opened this issue 6 years ago • 1 comments

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.

lady3bean avatar Jan 29 '20 01:01 lady3bean

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 avatar Jul 05 '20 22:07 thadk