Convert Moderation to a service+validator
This commit is contained in:
15
src/Validator/ImageSafety.php
Normal file
15
src/Validator/ImageSafety.php
Normal 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.';
|
||||
}
|
Reference in New Issue
Block a user