Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
vendor
/
spatie
/
laravel-data
/
src
/
Attributes
/
Validation
:
DateFormat.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Spatie\LaravelData\Attributes\Validation; use Attribute; use Illuminate\Support\Arr; use Spatie\LaravelData\Support\Validation\References\ExternalReference; #[Attribute(Attribute::TARGET_PROPERTY | Attribute::TARGET_PARAMETER)] class DateFormat extends StringValidationAttribute { protected string|array $format; public function __construct(string|array|ExternalReference ...$format) { $this->format = Arr::flatten($format); } public static function keyword(): string { return 'date_format'; } public function parameters(): array { return [$this->format]; } }