DemocracyClub / yournextrepresentative

👥 A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk
GNU Affero General Public License v3.0
21 stars 27 forks source link

Don't accept result values with . #2303

Closed VirginiaDooley closed 5 months ago

VirginiaDooley commented 5 months ago

Closes https://github.com/DemocracyClub/yournextrepresentative/issues/2300


VirginiaDooley commented 5 months ago

Small comment inline. Also do we never want decimals when excepting number input using DCNumberInput? It sounds quite general purpose to me. Would we ever be expecting percentages/proportions to be entered with it?

@pmk01 ^^ could you comment? I personally think accepting it and trying to figure out if it's the same context and mentioned in the issue vs a percentage and cleaning it could get tricky.

pmk01 commented 5 months ago

We never want decimals (well, we might if we add other electoral systems, but right now, no). We don't want people to add percentages either.

symroe commented 5 months ago

@VirginiaDooley This is good, but based on the decimal point, can you rename this field to DCIntegerInput to make it clear that it's for integers only?