Skip to content

Add missing Confirm councils to client-side validation rules#5898

Merged
mysociety-pusher merged 2 commits intomasterfrom
add-missing-client-side-confirm-validations
Mar 24, 2026
Merged

Add missing Confirm councils to client-side validation rules#5898
mysociety-pusher merged 2 commits intomasterfrom
add-missing-client-side-confirm-validations

Conversation

@chrismytton
Copy link
Copy Markdown
Member

Had a stuck Aberdeenshire report that had two phone numbers on the user, but Confirm only wants one.

There is server-side validation for long phone numbers, but it's skipped for reports created by staff members on behalf of someone else, which was the case for the stuck report.

# if we're contributing as someone else then allow landline numbers
if ( $field_errors{phone} && $c->stash->{contributing_as_another_user} && !$c->stash->{phone_may_be_mobile}) {
delete $field_errors{username};
delete $field_errors{phone};
}

Fix is to add in the missing client side validation. Have done this for the other councils that were obviously missing this.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.01%. Comparing base (4d1fabf) to head (838ff13).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
perllib/FixMyStreet/Roles/Cobrand/Northants.pm 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5898      +/-   ##
==========================================
- Coverage   83.02%   83.01%   -0.01%     
==========================================
  Files         465      465              
  Lines       36426    36427       +1     
  Branches     5975     5975              
==========================================
- Hits        30243    30241       -2     
- Misses       4438     4441       +3     
  Partials     1745     1745              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chrismytton chrismytton requested a review from dracos March 20, 2026 11:16
Copy link
Copy Markdown
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One query about Northamptonshire is all

Comment thread web/cobrands/fixmystreet-uk-councils/council_validation_rules.js Outdated
@chrismytton chrismytton requested a review from dracos March 20, 2026 12:36
Copy link
Copy Markdown
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woo

…thants

Replace the old Northamptonshire Highways entry with $.extend rules on
North Northamptonshire Council and West Northamptonshire Council, giving
both the 120-character title limit and the standard Confirm validation.
@mysociety-pusher mysociety-pusher force-pushed the add-missing-client-side-confirm-validations branch from 1de41e1 to 838ff13 Compare March 24, 2026 10:17
@mysociety-pusher mysociety-pusher merged commit 838ff13 into master Mar 24, 2026
21 checks passed
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 this pull request may close these issues.

3 participants