The "Drupal\Core\Validation\Plugin\Validation\Constraint\RangeConstraint" constraint can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.

Created on 13 May 2025, 3 days ago

Problem/Motivation

Occurs both on 3.1.7 and 3.1.x having a subfield

* Number field (decimal)
* Min value constraint
* Submit with empty value

Other observations:
* Setting the subfield required or not does not seem to matter
* No issues with only max value constraint
* Both or no constraints set also fine.

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇧🇪Belgium andreasderijcke Antwerpen / Gent

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

Comments & Activities

Production build 0.71.5 2024