generated from Templates_CodeFirst/templateHtmlCss
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
578 B
25 lines
578 B
<?php
|
|
|
|
class Validation{
|
|
|
|
static function val_action($action){
|
|
if (!isset($action)){
|
|
throw new Exceptionb('Pas d\'action');
|
|
}
|
|
}
|
|
|
|
static function val_form(string &$chaine, array &$dVueErreur){
|
|
|
|
if (!isset($chaine)||$chaine==""){
|
|
$dVueErreuR[] = "pas de chaine de charactère";
|
|
$chaine="";
|
|
}
|
|
|
|
if (!$chaine != filter_var($chaine, FILTER_SANITIZE_STRING)){
|
|
$dVueErreur[] = "tentative d'injection de code (attaque sécurité)";
|
|
$chaine="";
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|