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

Strict input validation #3

Closed
thoyt opened this issue Sep 8, 2015 · 1 comment
Closed

Strict input validation #3

thoyt opened this issue Sep 8, 2015 · 1 comment

Comments

@thoyt
Copy link
Contributor

thoyt commented Sep 8, 2015

The input fields all have limits that are imposed by the spinner buttons. However you can always just type in whatever you want in the field, which can sometimes cause the tool to crash if the value is either (a) very large, causing NaNs to be output by the comfort models or (b) invalid (e.g. a metabolic rate of "cat").

Two possible solutions:

  1. Strictly validate the input. If a number can't be parsed or is out of range, give a warning and replace the input with the default. (easier)
  2. Allow inputs out of range, but if NaNs are encountered during the computation, quit safely.
This was referenced Jul 10, 2019
FedericoTartarini added a commit that referenced this issue Jul 31, 2019
@FedericoTartarini
Copy link
Collaborator

I have implemented solution 1.

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