Skip to content

Uploader: Handle async validation - #705

Merged
aprentout merged 2 commits into
feature/create-payment-without-campaignfrom
ap/pyx-452
Sep 18, 2026
Merged

aprentout merged 2 commits into
feature/create-payment-without-campaignfrom
ap/pyx-452

Conversation

@aprentout

@aprentout aprentout commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Make the validate function of base-uploader asynchronous
  • Uploader-area: Wait for the validate response before displaying the results
  • Add async where needed in tests

Related to: #PYX-452

What are the observable changes?

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation with Figma design link. Don't forget to replace "design" by "file" in the URL. For example https://www.figma.com/file/example
  • Migrated touched components to Glimmer Components
  • Properly labeled

@linear-code

linear-code Bot commented Sep 15, 2026

Copy link
Copy Markdown

PYX-452


export default class BaseUploader extends Service implements UploaderInterface {
validate(request: UploadRequest, rules: FileValidator[]): ValidationResponse {
validate(request: UploadRequest, rules: FileValidator[]): Promise<ValidationResponse> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure where we currently have uses of this but it's going to be worth checking that it does not create issues ; even just typing related.

I at least see one usage in ember-identity here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only place baseUploader.validate is used, that's why there is a PR open for this 🙏

@aprentout
aprentout changed the base branch from master to feature/create-payment-without-campaign September 18, 2026 07:14
@aprentout
aprentout merged commit 71e65f1 into feature/create-payment-without-campaign Sep 18, 2026
5 checks passed
@aprentout
aprentout deleted the ap/pyx-452 branch September 18, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants