Validate numbers entered against known DB schema limits

Created on 18 October 2013, almost 12 years ago
Updated 18 August 2025, 5 days ago

The database schema uses decimal (15,5) as type to store the measument numbers. Incorrect user entries are not fully validated to match this. It seems the measurement fields are validated as :

  • Maximum length of 16 via #maxlength (15 + 1 for the separator)
  • is_numeric() when validating the fields separately

This is not correct, as it still allows f.e. 12 numbers or 6 decimals to be entered. Saving this will raise a PDOException: SQLSTATE[22003]: Numeric value out of range: 1264.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium interx Flanders

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024