added setting to limit the maximum length of a timesheet record (#2612)
This commit is contained in:
26
src/Validator/Constraints/TimesheetLongRunning.php
Normal file
26
src/Validator/Constraints/TimesheetLongRunning.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Validator\Constraints;
|
||||
|
||||
final class TimesheetLongRunning extends TimesheetConstraint
|
||||
{
|
||||
public const LONG_RUNNING = 'kimai-timesheet-long-running-01';
|
||||
|
||||
protected static $errorNames = [
|
||||
self::LONG_RUNNING => 'TIMESHEET_LONG_RUNNING',
|
||||
];
|
||||
|
||||
public $message = 'Maximum duration of {{ value }} hours exceeded.';
|
||||
|
||||
public function getTargets()
|
||||
{
|
||||
return self::CLASS_CONSTRAINT;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user