Convert Moderation to a service+validator

This commit is contained in:
2024-06-12 20:37:24 +02:00
parent 32e0774302
commit b0f09a8217
12 changed files with 126 additions and 53 deletions

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Validator;
use Symfony\Component\Validator\Constraint;
/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*/
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class ImageSafety extends Constraint
{
public string $message = 'The uploaded image is not safe.';
}