DateTime.php 1004 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Validator\Constraints;
  11. use Symfony\Component\Validator\Constraint;
  12. /**
  13. * @Annotation
  14. * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
  15. *
  16. * @author Bernhard Schussek <bschussek@gmail.com>
  17. */
  18. class DateTime extends Constraint
  19. {
  20. const INVALID_FORMAT_ERROR = '1a9da513-2640-4f84-9b6a-4d99dcddc628';
  21. const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c';
  22. const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27';
  23. protected static $errorNames = array(
  24. self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR',
  25. self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR',
  26. self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR',
  27. );
  28. public $message = 'This value is not a valid datetime.';
  29. }