mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
altersteilzeit geblockt mit 0 Stunden zulassen
This commit is contained in:
@@ -86,16 +86,24 @@ EOTXT;
|
||||
|
||||
public function validate()
|
||||
{
|
||||
if( !(filter_var($this->wochenstunden, FILTER_VALIDATE_FLOAT,
|
||||
if( false === filter_var($this->wochenstunden, FILTER_VALIDATE_FLOAT,
|
||||
array(
|
||||
'options' => array(
|
||||
'min_range' => 0,
|
||||
'max_range' => 100
|
||||
)
|
||||
)
|
||||
)) ) {
|
||||
) ) {
|
||||
$this->validationerrors[] = 'Stunden muss eine Kommazahl im Bereich 0 bis 100 sein.';
|
||||
}
|
||||
else
|
||||
{
|
||||
if( floatval($this->wochenstunden) < floatval('0.01') &&
|
||||
$this->teilzeittyp_kurzbz !== 'altersteilzeit' )
|
||||
{
|
||||
$this->validationerrors[] = '0 Wochenstunden ist nur in Kombination mit Altersteilzeit zulässig.';
|
||||
}
|
||||
}
|
||||
|
||||
return parent::validate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user