Part 2 - Improve ValidateCount attribute error message by iSazonov · Pull Request #3656 · PowerShell/PowerShell · GitHub
Skip to content

Part 2 - Improve ValidateCount attribute error message#3656

Merged
daxian-dbw merged 2 commits intoPowerShell:masterfrom
iSazonov:validatecount-message2
May 2, 2017
Merged

Part 2 - Improve ValidateCount attribute error message#3656
daxian-dbw merged 2 commits intoPowerShell:masterfrom
iSazonov:validatecount-message2

Conversation

@iSazonov
Copy link
Copy Markdown
Collaborator

Based on discussion #3596 (comment)

Leave only two message for:

  1. Count is not in allowed range.
  2. Count is not exactly equal allowed value.

/cc @lzybkr @mklement0

Leave only two message for:
1. Count is not in allowed range.
2. Count is not exactly equal allowed value.
@iSazonov
Copy link
Copy Markdown
Collaborator Author

throw new ValidationMetadataException("ValidateCountSmallerThanMin",
null, Metadata.ValidateCountFailure,
MinLength, MaxLength, len);
throw new ValidationMetadataException("ValidateCountExactlyFailure",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM overall, but I suggest removing the "ly": ValidateCountExactlyFailure -> ValidateCountExactFailure

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! Fixed.

@iSazonov iSazonov force-pushed the validatecount-message2 branch from 1583c3b to bdd53bf Compare April 28, 2017 03:54
@daxian-dbw
Copy link
Copy Markdown
Member

@lzybkr the FullyQualifiedErrorId changed with this PR, does it need to be reviewed by powershell committee as a breaking change?

@lzybkr
Copy link
Copy Markdown
Contributor

lzybkr commented May 1, 2017

@daxian-dbw daxian-dbw merged commit 3d7ef43 into PowerShell:master May 2, 2017
@iSazonov iSazonov deleted the validatecount-message2 branch May 3, 2017 03:04
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.

6 participants