diff --git a/Validation.php b/Validation.php new file mode 100644 index 0000000..18d2e9c --- /dev/null +++ b/Validation.php @@ -0,0 +1,35 @@ +array("regexp"=>"([0-9]|([A-F]|[a-f])){6}"))); + } + public static function validerEffectuationTache($estFait) + { + return filter_var($estFait, FILTER_VALIDATE_BOOL); + } + + public static function netoyerEtValiderTache(string $nom, string $comm, string $couleur, $estFait) + { + $nom = self::netoyerNomTache($nom); + $comm = self::netoyerCommentaireTache($comm); + $couleurValide = self::validerCouleurTache($couleur); + $estFaitValide = self::validerEffectuationTache($estFait); + + return array( + 'nom' => $nom, + 'commentaire' => $comm, + 'couleur' => $couleurValide, + 'estFait' => $estFaitValide + ); + } +}