[PHP-SYMFONY] Debug Date and DateTime Assert (#16874)

This commit is contained in:
loicconan 2023-10-23 16:26:27 +02:00 committed by GitHub
parent cdbb73aa55
commit cb85358aa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -42,11 +42,11 @@
{{/isContainer}}
{{^isContainer}}
{{#isDate}}
* @Assert\Date()
* @Assert\Type("\Date")
* @Type("DateTime<'Y-m-d'>")
{{/isDate}}
{{#isDateTime}}
* @Assert\DateTime()
* @Assert\Type("\DateTime"))
* @Type("DateTime")
{{/isDateTime}}
{{^isDate}}

View File

@ -71,7 +71,7 @@ class Order
/**
* @var \DateTime|null
* @SerializedName("shipDate")
* @Assert\DateTime()
* @Assert\Type("\DateTime"))
* @Type("DateTime")
*/
protected ?\DateTime $shipDate = null;