Merge lp:~methanal-developers/methanal/validate-large-numbers into lp:methanal
Proposed by
Jonathan Jacobs
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Tristan Seligmann | ||||||||
Approved revision: | 146 | ||||||||
Merged at revision: | 146 | ||||||||
Proposed branch: | lp:~methanal-developers/methanal/validate-large-numbers | ||||||||
Merge into: | lp:methanal | ||||||||
Diff against target: |
324 lines (+220/-13) 4 files modified
methanal/js/Methanal/Tests/TestView.js (+90/-0) methanal/js/Methanal/View.js (+14/-1) methanal/test/test_view.py (+50/-2) methanal/view.py (+66/-10) |
||||||||
To merge this branch: | bzr merge lp:~methanal-developers/methanal/validate-large-numbers | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tristan Seligmann | Approve | ||
Review via email:
|
To post a comment you must log in.
I have a few concerns that I'd like some input on:
1. There is no realtime validation for these limits. I could pass the ranges through to the client and do some validation but for really large values (like 2 ** 63) Javascript has rounding errors (since numerics are all internally backed by a double) and so validation for the really large numbers breaks down because the ranges are now inaccurately represented. This may not be a concern since there is still validation on the server side and for smaller numbers we will have still accurate validation. Is this worth implementing?
2. The message that comes back from the server side doesn't indicate what input generated the error (if an input did generate one), so getting an error like "ValueError: 5 is bigger than 4" is not likely to help anyone, really. But maybe implementing client side validation, as in my first point, would help for the cases where the limits are more likely to impact users.