Value comparison order

Created on 28 July 2023, over 1 year ago
Updated 5 January 2024, 12 months ago

Problem/Motivation

I've done some general testing as requested here 📌 Drupal 9 version Fixed to help move this towards a release, and have come across one potential issue:

When comparing values, the element on which the rule is applied is considered to be the second (i.e. right-hand) element in the comparison.

Steps to reproduce

- Create two number elements, number1 and number2
- On number1, apply the 'Compare two values' validation. (Compare with number2, operator '>')

The validator considers number1 to be on the right hand side of the operation, rather than the left hand side, as I would expect.
i.e. so this validates `number2 > number1`, rather than `number1 > number2`.

If this is intentional, perhaps an update to the help info would be useful for people like me to whom the order of elements is not clear?

🐛 Bug report
Status

Needs review

Version

2.0

Component

Validation rules

Created by

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

Comments & Activities

Production build 0.71.5 2024