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

Error submitting results with a decimal value #2300

Open
sjorford opened this issue May 5, 2024 · 1 comment · Fixed by #2303
Open

Error submitting results with a decimal value #2300

sjorford opened this issue May 5, 2024 · 1 comment · Fixed by #2303
Assignees

Comments

@sjorford
Copy link
Contributor

sjorford commented May 5, 2024

Copying and pasting the results from https://www.wokingham.gov.uk/council-and-meetings/elections-and-voting/local-government-and-pcc-election-results-2024 and some of the values have a typo - they have "." instead of a "," as the thousands separator:
image

This causes a 500 error when submitting the form - although the values (with both . and ,) seem to pass the form validation - using just commas seems to work fine
image

The validation regex pattern="[0-9\s\.,]*" for the vote fields allows a decimal point - removing this should fix the issue

@sjorford
Copy link
Contributor Author

This fix has broken entry of turnout percentages with decimals - e.g. trying to fix the votes on https://candidates.democracyclub.org.uk/uk_results/local.adur.hillside.2021-05-06/
image

The source at https://www.adur-worthing.gov.uk/elections-and-voting/election-results/2021/#adc only has a turnout percentage, not total turnout and electorate - to fix the votes I would have to edit the existing turnout percentage to remove the decimals

@sjorford sjorford reopened this Jun 27, 2024
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

Successfully merging a pull request may close this issue.

2 participants