Open daPhantom opened 8 months ago
I also checked the actual rules when dumping it in the request... it all looks properly setup and configured. I got no idea. Is it maybe related to the issue I reported regarding validation and behaviour of upload_multiple a few weeks ago?
Sorry for opening the third issue. But I try a lot of ways and invest 1-3 hours before opening a bug report here.
Hi @daPhantom,
Thanks for reporting the issue, and don't worry about posting many issues. As long as you spend time validating the scenarios and think something is not working properly, we appreciate you taking the time to post it here. If this is a valid issue, everyone will get the benefit.
I will try to reproduce this and assign it to the team if this is indeed an issue. In any way, we will keep you posted.
Thanks!
related with #5440
Bug report
What I did
Defined a relationship within the model:
Defined a
relationship
field including anupload
field as subfield:Defined validation rules within Request:
What I expected to happen
What happened
I am able to save empty files or files which do not match the mime type. Therefore it looks like no validation at all is performed.
What I've already tried to fix it
When I use the same configuration as a root element without subfield or relationship the validation works properly.
Is it a bug in the latest version of Backpack?
yes
Backpack, Laravel, PHP, DB version
PHP VERSION:
PHP 8.2.12 (cli) (built: Oct 26 2023 17:33:49) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.12, Copyright (c) Zend Technologies with Zend OPcache v8.2.12, Copyright (c), by Zend Technologies with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans
LARAVEL VERSION:
10.38.1.0
BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.2.2 backpack/crud: 6.4.2 backpack/devtools: 2.0.3 backpack/generators: v4.0.2 backpack/permissionmanager: 7.1.1 backpack/pro: 2.0.20 backpack/revise-operation: 2.0.0 backpack/theme-tabler: 1.1.2