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.
Product reference fields doesn't actually validate user input, but instead strip anything that cannot be found.
This is very poor behavior for two reasons.
1. It's possible to bypass a required product reference field, by entering a random string (bug).
2. By not giving the user any feedback that he/she entered an invalid value the user can thing, that what he entered was ok. since it can be quite hard to see the values when there are multiple values entered, this is very bad UX.
I think the best option would be to require all values entered to actually be valid.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1844552-validate-product-reference-field.patch | 680 bytes | googletorp |
Comments
Comment #1
googletorp CreditAttribution: googletorp commentedAnd the patch that fixes this by doing the validation.
Comment #2
rszrama CreditAttribution: rszrama commentedEasy enough; tweaked the message and committed.