diff --git a/trunk/includes/class/class.LSform.php b/trunk/includes/class/class.LSform.php index 8b980e15..c33e7d0f 100644 --- a/trunk/includes/class/class.LSform.php +++ b/trunk/includes/class/class.LSform.php @@ -180,8 +180,22 @@ class LSform { * * @retval boolean */ - function definedError($element) { - return isset($this -> _elementsErrors[$element]); + function definedError($element=NULL) { + if ($element) { + return isset($this -> _elementsErrors[$element]); + } + else { + return !empty($this -> _elementsErrors); + } + } + + /** + * Retourne le tableau des erreurs + * + * @retval Array array(element => array(errors)) + */ + function getErrors() { + return $this -> _elementsErrors; } /**