Skip to content

Conversation

Copy link

Copilot AI commented Dec 4, 2025

Addresses feedback from PR #225: users could submit the credential issuance form without selecting a credential type, sending an empty string to the API.

Changes:

  • Added validation in issueCredential() to check selectedCredentialType is non-empty before API call
  • Error displays "Please select a credential type" when validation fails
  • Validation executes before issuer lookup, following same pattern as existing selectedWalletDID validation
issueCredential() {
  this.issueError = undefined
  
  if (!this.selectedCredentialType) {
    this.issueError = 'Please select a credential type'
    return
  }

  const issuerDID = this.getIssuerForType(this.selectedCredentialType)
  // ... rest of validation and API call
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: reinkrul <1481228+reinkrul@users.noreply.github.com>
Copilot AI changed the title [WIP] Update credential issuance based on review feedback Add validation for credential type selection in RequestCredential form Dec 4, 2025
Copilot AI requested a review from reinkrul December 4, 2025 07:57
@reinkrul reinkrul marked this pull request as ready for review December 4, 2025 07:57
@reinkrul reinkrul merged commit 79dd01e into openid4vci-issuance Dec 4, 2025
@reinkrul reinkrul deleted the copilot/sub-pr-225 branch December 4, 2025 07:57
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