diff --git a/ChangeLog b/ChangeLog
index 8f822d08771..22325dd9df8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,7 @@ English Dolibarr ChangeLog
- Fix: [ bug #2542 ] Contracts store localtax preferences
- Fix: Bad permission assignments for stock movements actions
- Fix: [ bug #2891 ] Category hooks do not work
+- Fix: [ bug #2696 ] Adding complementary attribute fails if code is numerics
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php
index 89edfcbae8e..d547d635855 100644
--- a/htdocs/core/actions_extrafields.inc.php
+++ b/htdocs/core/actions_extrafields.inc.php
@@ -118,7 +118,7 @@ if ($action == 'add')
if (! $error)
{
// attrname must be alphabetical and lower case only
- if (isset($_POST["attrname"]) && preg_match("/^[a-z0-9-_]+$/",$_POST['attrname']))
+ if (isset($_POST["attrname"]) && preg_match("/^[a-z0-9-_]+$/",$_POST['attrname']) && !is_numeric($_POST["attrname"]))
{
// Construct array for parameter (value of select list)
$default_value = GETPOST('default_value');
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 4f5ac8fb9ec..e4e35c2653a 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -65,7 +65,7 @@ ErrorNoValueForCheckBoxType=Please fill value for checkbox list
ErrorNoValueForRadioType=Please fill value for radio list
ErrorBadFormatValueList=The list value cannot have more than one come : %s, but need at least one: llave,valores
ErrorFieldCanNotContainSpecialCharacters=Field %s must not contains special characters.
-ErrorFieldCanNotContainSpecialNorUpperCharacters=Field %s must not contains special characters, nor upper case characters.
+ErrorFieldCanNotContainSpecialNorUpperCharacters=Field %s must not contain special characters, nor upper case characters and cannot contain only numbers.
ErrorNoAccountancyModuleLoaded=No accountancy module activated
ErrorExportDuplicateProfil=This profile name already exists for this export set.
ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete.