Skip to content

[LiveComponent] Uploading Files example on ux.symfony.com does not allow Upload after validation-error #2731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TPantelConventus opened this issue May 13, 2025 · 1 comment
Labels
docs Improvements or additions to documentation LiveComponent

Comments

@TPantelConventus
Copy link

The "Uploading files" example which can be found here does not work as intended.

If you use the "Single file" input field and try to upload a file, which does not fulfill the validation-rules (in that case: 'maxSize' => '1M', it will show the validation error, which is set in the component's PHP-class via the #[LiveProp] public ?string $singleFileUploadError = null;

So far - so good.

But if you then try to upload a file, that does fulfill the requirements, it still fails and shows the validation error.

Image

@TPantelConventus TPantelConventus added the docs Improvements or additions to documentation label May 13, 2025
@smnandre
Copy link
Member

As we do not want to handle any upload from the internet, this demo is only partially functional. Indeed, on a real app, when you validate successfully a file, you may want to reset any previous error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation LiveComponent
Projects
None yet
Development

No branches or pull requests

3 participants