Skip to content
Snippets Groups Projects
Commit 6fbb4a3c authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

Merge branch 'fix/18461/20.10' into '20.10'

[18461] Contact / adresse / Numéro de rue : la valeur 0 provoque une erreur sur les notifications de bannettes

See merge request maarch/MaarchCourrier!481
parents d2141d0e bafb8fb3
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,12 @@ class ValidatorModel
throw new \Exception('First argument must be a non empty array');
}
foreach ($keys as $key) {
if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '' && $args[$key] != '') {
$args[$key] .= 'NOT_EMPTY';
}
if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '0' && $args[$key] != '0') {
$args[$key] .= 'NOT_EMPTY';
}
if (!Validator::notEmpty()->validate($args[$key])) {
throw new \Exception("Argument {$key} is empty");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment