Page MenuHomePhabricator

🐛 Bug: Placeholder name prevention does not work
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Go to the address part of the donation form
  2. Enter "Mustermann" in the last name field

Expected Result:
The text "Are you sure your name is Mustermann" shows up below the field

Actual result:
Nothing happens

The current code compares the entered value with the placeholder, which is now "z. B. Mustername", but even that value doesn't trigger the behavior. The code changes for T285394: Track different donation form types in matomo replicate the broken behavior by making the check function return false. See implementation notes for why.

Implementation notes
If we decide to fix the functionality, we need to pass in the pattern as a property. The previous method (accessing a translation inside the computed function) doesn't play well with our combination of composition API + Vue 2 + Vue18n.
The language items for placeholder and validation pattern should be put close to each other in the content repository's JSON file.
The fields for last name (in this case Mustername, Mustermann, Musterfrau), street address and city are checked for containing the example in the placeholder.

Event Timeline

kai.nissen set the point value for this task to 8.
AbbanWMDE moved this task from Doing to Review on the WMDE-FUN-Sprint-2023-01-09 board.
AbbanWMDE subscribed.
kai.nissen changed the point value for this task from 8 to 1.Jan 23 2023, 11:15 AM

@CorinnaHillebrand_WMDE The email address is not checked for the placeholder value. All other fields work fine.

@kai.nissen The email value wasn't checked before and isn't part of the acceptance criteria. I can add it easily enough though, so would you like me to?

@kai.nissen This is added now. The German translation item in the content repo is currently in English though, can you translate it for me? The key is donation_form_email_placeholder_warning

redeployed the latest changes (lastname-placeholder-message / main ) to https://testing04.wikimedia.customers.manitu.net/

Looks good to me. I added the German translation to the content repository. Can be deployed now.