Rates values validation

Created on 13 August 2025, 3 months ago

Problem/Motivation

Putting an incorrect float value results with an error that will erase all the previous values in the DB.

Steps to reproduce

1. Visit /admin/commerce/config/exchange-rates
2. Create an entity with plugin: 'Manual' and set up some non-zero currency rates values, then save the entity
3. Edit the newly created entity
4. Put an incorrect float for one of the rates values (e.g. use comma as a delimiter: '0,1' or just put an empty string)
5. Save the entity and you'll see the WSOD
6. Also check the db, all the previous values will be zeroed out

Proposed resolution

Implement a ExchangeRatesForm:validateForm() method that will check if the values are actually valid float values

📌 Task
Status

Active

Version

2.0

Component

Code

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024