Fix better error message
This commit is contained in:
parent
b2d9f21253
commit
e7554d377f
@ -510,7 +510,7 @@ if ($id == 10)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Actions ajout ou modification d'une entree dans un dictionnaire de donnee
|
// Actions add or modify an entry into a dictionary
|
||||||
if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||||
{
|
{
|
||||||
$listfield=explode(',',$tabfield[$id]);
|
$listfield=explode(',',$tabfield[$id]);
|
||||||
@ -581,6 +581,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors');
|
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($id == 3 && ! is_numeric($_POST["code"]))
|
||||||
|
{
|
||||||
|
$ok=0;
|
||||||
|
setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric",$langs->transnoentities("Code")), null, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
// Clean some parameters
|
// Clean some parameters
|
||||||
if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
|
if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user