learning-center/app/SharedKernel/Controllers/Validation.php

17 lines
299 B
PHP
Raw Permalink Normal View History

2024-09-08 13:48:26 +03:00
<?php
declare(strict_types=1);
namespace App\SharedKernel\Controllers;
trait Validation
{
/**
* @throws \InvalidArgumentException
*/
public function validatePostRequest(array $rules): void
{
(new \App\SharedKernel\Http\Validation($rules))->validate($_POST);
}
}