Skip to Content

Contact form no longer loses messages over a bad member number

Shipped 2026-09-30

A contact form enquiry failed with a server error and was never delivered. The visitor had typed 0000000999999 into the optional member number field, and contact_forms.member_id holds 11 characters, so the insert failed. The email to IBA was only sent after the insert, so the message was lost with it.

What changed

  • The request is validated. Each field is limited to the width of its column, so an over-long value gets a clear message on the form instead of a server error.

  • The member number is cleaned up, not rejected. It is optional and typed by hand, so stray spaces, prefixes and leading zeros are removed, and a value that still can’t be a member number is dropped rather than blocking the message.

  • The email no longer depends on the database. If saving the enquiry fails, the error is logged and the email is still sent.

  • Jira: TNBUGS-1862 

  • PR: #951 

  • Author: @alexhobday

Last updated on