Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The regular expression for validating number fields was updated in #2573523: Omitting leading zero from decimal fails validation.
Since the x-flag was added to the regexp, using a space ( ) as thousands separator will result in a validation error because the space is not escaped.
Validation error message:
Number field value must format numbers as "12 345,68".
Comment | File | Size | Author |
---|---|---|---|
#6 | webform-space_thousands-2627874-6.patch | 1.17 KB | DanChadwick |
#2 | spaced_used_as_thousands_separator-2627874-2.patch | 650 bytes | Rade |
Comments
Comment #2
Rade CreditAttribution: Rade at Druid commentedThis patch will properly escape the separator if it is a space.
Comment #3
Rade CreditAttribution: Rade at Druid commentedComment #4
Rade CreditAttribution: Rade at Druid commentedComment #6
DanChadwick CreditAttribution: DanChadwick commentedGood catch. Since preg_quote isn't doing what we want for space, and since space, comma, and period all need escaping, let's just use \\ to escape the single character.
Committed to 7.x-4.x.
Comment #7
DanChadwick CreditAttribution: DanChadwick commentedComment #8
fenstratClosing to clear out the old Webform 8.x-4.x branch. See #2827845: [roadmap] YAML Form 8.x-1.x to Webform 8.x-5.x.