- Issue created by @Xperd
- Assigned to viren18febS
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 7:36am 6 September 2023 - 🇮🇳India viren18febS
Hi @Xperd
For EAN number in text field you need to use a specific validations, you can use Field Validation → module. in this we have specific configurations for EAN validation. Or you can use hook_form_alter() for applied a custom validation on that field.
- Status changed to Active
about 1 year ago 2:52pm 11 September 2023 - 🇨🇿Czech Republic Xperd
I don't need validation.
It is not possible change text field value from 1234567890 to 0001234567890.
- Status changed to Needs review
about 1 year ago 12:11pm 12 September 2023 - 🇮🇳India viren18febS
I am able to set both values in text field, not getting any issue. attached screen shot for your reference.
- 🇺🇸United States aaustin
I've come to this issue looking for answers about leading zeros in the core string field, where this exact thing is happening (9.5.11). The issue also appears in the address field: https://www.drupal.org/project/address/issues/3017352 → I think the important information is that if the value is currently set to a number and you change it to the same number but with leading zeros it doesn't update. Likewise, it doesn't work going from leading zeros to no leading zeros or two leading zeros to four leading zeros, etc. You can change it to something else (that isn't the numerically equivalent) and then change it to the value with leading zeros and it works. But there seems to be something in Drupal core that doesn't update a field when you the value is the same integer but different strings.