Execute passes rule validation if element is not required and value is "0"

Created on 10 January 2017, almost 8 years ago
Updated 12 September 2024, 3 months ago

Problem/Motivation

Executing rule validation is passed if element is not required and element value is "0". Condition in function fapi_validation_rules_execute() checks value with empty($element['#value']), which evaluates to TRUE when $element['#value'] is "0".

Proposed resolution

Rule validation should be passes only if value is zero length.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇮Finland okaalto

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

Merge Requests

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