Skip to content

Conversation

ahoisl
Copy link
Contributor

@ahoisl ahoisl commented Apr 7, 2022

Description

Add useConstraintMessages option parameter to ValidationError.toString function to use constraint messages instead of constraint names in the string representation for an error.

Checklist

  • the pull request title describes what this PR does (not a vague title like Update index.md)
  • the pull request targets the default branch of the repository (develop)
  • the code follows the established code style of the repository
    • npm run prettier:check passes
    • npm run lint:check passes
  • tests are added for the changes I made (if any source code was modified)
  • documentation added or updated
  • I have run the project locally and verified that there are no errors

Fixes

fixes #1611

@NoNameProvided
Copy link
Member

Hi! Thanks for opening this PR, can you rebase or cherry-pick it to the latest develop?

@ahoisl ahoisl force-pushed the feat/ErrorToStringWithConstraintMessages branch from f212c28 to 227a48a Compare November 20, 2022 20:57
@ahoisl
Copy link
Contributor Author

ahoisl commented Nov 20, 2022

Hi! Thanks for opening this PR, can you rebase or cherry-pick it to the latest develop?

@NoNameProvided I just cherry-picked the commit to the latest develop branch 👍

@ahoisl ahoisl force-pushed the feat/ErrorToStringWithConstraintMessages branch from 227a48a to 1796341 Compare November 21, 2022 07:31
@ahoisl
Copy link
Contributor Author

ahoisl commented Nov 21, 2022

@NoNameProvided and I fixed the tests just now 😄

@ahoisl ahoisl force-pushed the feat/ErrorToStringWithConstraintMessages branch 4 times, most recently from 4fd8298 to 1d48045 Compare November 25, 2022 10:14
Copy link
Member

@braaar braaar left a comment

Choose a reason for hiding this comment

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

I think "show" is a better word than "use". Other possible candidates are "print", "list", "return", "display".

@ahoisl ahoisl force-pushed the feat/ErrorToStringWithConstraintMessages branch from 1d48045 to fc517f6 Compare November 26, 2022 22:02
@ahoisl ahoisl force-pushed the feat/ErrorToStringWithConstraintMessages branch 3 times, most recently from 440c393 to 909fa5c Compare November 29, 2022 10:23
@ahoisl ahoisl force-pushed the feat/ErrorToStringWithConstraintMessages branch from 909fa5c to 4f60259 Compare December 1, 2022 10:16
braaar
braaar previously approved these changes Dec 2, 2022
@braaar
Copy link
Member

braaar commented Dec 2, 2022

Let's see what the workflow says

@ahoisl
Copy link
Contributor Author

ahoisl commented Dec 2, 2022

Let's see what the workflow says

Apparently needs approval from a maintainer...
@NoNameProvided , I guess, your review is required. Not sure who else is a maintainer? Thank you!

@NoNameProvided NoNameProvided force-pushed the feat/ErrorToStringWithConstraintMessages branch from 4f60259 to 7e9e15b Compare December 2, 2022 12:11
@NoNameProvided NoNameProvided changed the title feat: add option to use constraint messages in ValidationError.toString feat: add showConstraintMessages option to ValidationError.toString() Dec 2, 2022
@NoNameProvided NoNameProvided merged commit dbab07a into typestack:develop Dec 2, 2022
@ahoisl ahoisl deleted the feat/ErrorToStringWithConstraintMessages branch December 2, 2022 13:11
@github-actions
Copy link

github-actions bot commented Jan 2, 2023

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Provide an option to ValidationError.toString to use constraint messages instead of names only
3 participants