mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
37 lines
704 B
PHP
37 lines
704 B
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.4
|
|
*
|
|
* @package phpOMS\Validation\Base
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link https://orange-management.org
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace phpOMS\Validation\Base;
|
|
|
|
use phpOMS\Validation\ValidatorAbstract;
|
|
|
|
/**
|
|
* Validate date.
|
|
*
|
|
* @package phpOMS\Validation\Base
|
|
* @license OMS License 1.0
|
|
* @link https://orange-management.org
|
|
* @since 1.0.0
|
|
*/
|
|
abstract class DateTime extends ValidatorAbstract
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function isValid(mixed $value, array $constraints = null) : bool
|
|
{
|
|
return (bool) \strtotime($value);
|
|
}
|
|
}
|