New answers tagged


You can rewrite your entire variable section and constructor with PHP 8 constructor promotion: class PostController extends BaseController { /** Description */ public function __construct(protected PostForm $postForm, protected PostCreationService $post, protected PostRepository $...


You didn't tell us what kind of application you maintain but when it's something with a UI then you shouldn't need this kind of validation at all. Instead you should use proper masks for the input fields and prevent users from entering wrong characters entriely.

Top 50 recent answers are included