Skip to content
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

Define concepts for converting and validating .data #977

Merged
merged 2 commits into from
Jul 7, 2022

Conversation

stephenmcgruer
Copy link
Collaborator

@stephenmcgruer stephenmcgruer commented Nov 19, 2021

This PR introduces two new definitions (dfn) for both the IDL type that
PaymentMethodData/data should be converted into, and for the validation
steps that a payment method will perform on it. This allows payment method
specs to define these in a way that is cross-linkable to the PaymentRequest
specification.

This change is mostly editorial, except that it allows for arbitrary error types
to be thrown during validation (previously only TypeError would be thrown).


Preview | Diff

@stephenmcgruer stephenmcgruer force-pushed the smcgruer/early_validation_specified branch from 7a6cfe4 to c3d0335 Compare November 19, 2021 12:46
@stephenmcgruer
Copy link
Collaborator Author

@marcoscaceres - fyi this is my suggestion for adding a dfn for #976, to make it easier for other specifications to define their behaviour for it.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

Validation should be separate from conversion...

@marcoscaceres marcoscaceres changed the title [Editorial] Define a concept for converting and validating .data Editorial: Define a concept for converting and validating .data Jan 19, 2022
@stephenmcgruer
Copy link
Collaborator Author

cc @ianbjacobs as landing this blocks w3c/secure-payment-confirmation#194

The build is currently failing because the upstream of this PR (#976) is behind HEAD and needs updated to include 34c206f

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

Noting this makes a couple of normative changes... in particular, it no longer exclusively throws a TypeError during the processing steps.

Base automatically changed from early_validation to gh-pages July 6, 2022 01:24
This makes it easier for other specifications to clearly indicate their defined
steps to convert and validate the data member.
@stephenmcgruer stephenmcgruer force-pushed the smcgruer/early_validation_specified branch from 2b4692a to a389afa Compare July 6, 2022 13:16
@stephenmcgruer stephenmcgruer changed the title Editorial: Define a concept for converting and validating .data Define concepts for converting and validating .data Jul 6, 2022
@stephenmcgruer
Copy link
Collaborator Author

Noting this makes a couple of normative changes... in particular, it no longer exclusively throws a TypeError during the processing steps.

Good catch - thanks for noticing this! I've updated the PR description and title (along with addressing your other comments) to reflect that new errors may be thrown.

@marcoscaceres marcoscaceres merged commit 8c45522 into gh-pages Jul 7, 2022
@stephenmcgruer stephenmcgruer deleted the smcgruer/early_validation_specified branch July 7, 2022 12:28
stephenmcgruer added a commit to w3c/secure-payment-confirmation that referenced this pull request Jul 7, 2022
marcoscaceres added a commit that referenced this pull request Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants