mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
validation
This commit is contained in:
@@ -219,7 +219,13 @@ EOTXT;
|
||||
}
|
||||
|
||||
public function validate() {
|
||||
return array();
|
||||
if( count($this->validationerrors) > 0 ) {
|
||||
$this->isvalid = false;
|
||||
} else {
|
||||
$this->isvalid = true;
|
||||
}
|
||||
|
||||
return $this->isvalid;
|
||||
}
|
||||
|
||||
public abstract function toStdClass();
|
||||
|
||||
@@ -104,11 +104,12 @@ EOTXT;
|
||||
|
||||
public function validate()
|
||||
{
|
||||
if( (inval($this->benutzerfunktion_id) < 1)
|
||||
if( (intval($this->benutzerfunktion_id) < 1)
|
||||
&& ($this->benutzerfunktiondata === NULL) ) {
|
||||
$this->isvalid = false;
|
||||
$this->validationerrors[] = 'Eine bestehende Funktion oder eine '
|
||||
. 'Funktion und eine Organisationseinheit müssen ausgewählt sein.';
|
||||
}
|
||||
|
||||
parent::validate();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user