Describe the bug
Users can input more units via Unit Styles than present in Unit Types, and there are no validation checks to prevent this. As a result, it is possible to input impossible values ("200% of units in this development are studios")
Steps to reproduce
Walk us through how you revealed the bug.
Go to 'Create a development'
Scroll to "development type" and select Residential
Enter 1 in each of the four Unit Type fields
Enter 5 into one of the three Unit Style fields
See that the percentage for that field is 125% (5 units out of 4)
Expected behavior
The percentages for Unit Styles should add up to 100%, and users should not be able to write in more units in the Unit Styles than they have in the above Unit Types section.
Screenshots
Example of what should be an invalid input:
Example of what could be a valid input:
Desktop (please complete the following information):
OS: MacOS Catalina
Browser Firefox
Version 82.0.03
Additional context
The denominator should always be the number of units dictated in the Unit Type section. The numerator (the total number of units accounted for in Unit Styles) should not be able to exceed this for the math to work out.
Describe the bug Users can input more units via Unit Styles than present in Unit Types, and there are no validation checks to prevent this. As a result, it is possible to input impossible values ("200% of units in this development are studios")
Steps to reproduce Walk us through how you revealed the bug.
Expected behavior The percentages for Unit Styles should add up to 100%, and users should not be able to write in more units in the Unit Styles than they have in the above Unit Types section.
Screenshots Example of what should be an invalid input:
Example of what could be a valid input:
Desktop (please complete the following information):
Additional context The denominator should always be the number of units dictated in the Unit Type section. The numerator (the total number of units accounted for in Unit Styles) should not be able to exceed this for the math to work out.