Commit 8f152ec5cd50ba35fd2f64101871b8bd7e33d041

Authored by Etienne Pallier
1 parent a989fd35
Exists in master and in 1 other branch dev

Utilisateur, champ obligatoire

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
src/Model/Table/MaterielsTable.php
... ... @@ -466,6 +466,13 @@ class MaterielsTable extends AppTable
466 466 'message' => 'Ce champ contient des caractères interdits',
467 467 'provider' => 'table'
468 468 ]);
  469 + $validator
  470 + ->allowEmptyString('nom_user', false, 'Ce champ est obligatoire')
  471 + ->add('nom_user', 'valid', [
  472 + 'rule' => 'check_string',
  473 + 'message' => 'Ce champ contient des caractères interdits',
  474 + 'provider' => 'table'
  475 + ]);
469 476 $validator->notEmpty('nom_responsable')->add('nom_responsable', 'valid', [
470 477 'rule' => 'check_string',
471 478 'message' => 'Ce champ contient des caractères interdits',
... ...