typeschema icon indicating copy to clipboard operation
typeschema copied to clipboard

Fixed Class Validator using development debug messages

Open niemyjski opened this issue 1 year ago • 4 comments

I just started using this implementation of class library and noticed I was getting really horrible error messages.

image

Turns out it's because this line https://github.com/decs/typeschema/blob/main/packages/class-validator/src/validation.ts#L26 was using a developer helper method https://github.com/typestack/class-validator/issues/26

I've added some tests to use the constrain messages. I've also flat mapped the errors so the messages are not combined (which I hope is ok but need more testing downstream in superforms).

niemyjski avatar Sep 18 '24 13:09 niemyjski

⚠️ No Changeset found

Latest commit: 7905cb77f38f4c96022d4809f4808d4244f55b84

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Sep 18 '24 13:09 changeset-bot[bot]

I didn't see any existing change sets / haven't really used them. But if you have a nightly build I can try that otherwise will need a bump.

niemyjski avatar Sep 18 '24 14:09 niemyjski

@decs can you please review this.

niemyjski avatar Sep 19 '24 02:09 niemyjski

These error messages are pretty bad. Would love to see this PR get merged.

ejsmith avatar Sep 25 '24 03:09 ejsmith

@decs can we get this merged?

niemyjski avatar Oct 09 '24 18:10 niemyjski

Thanks a ton! Any chance we can get a release?

niemyjski avatar Oct 13 '24 21:10 niemyjski

for sure! this is out as @typeschema/class-validator v0.3.0 thanks for the fix, @niemyjski!!

decs avatar Oct 14 '24 00:10 decs