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

Allow to use fully qualified type "Vogen.Validation" as the return value #425

Closed
kamparR opened this issue May 29, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@kamparR
Copy link

kamparR commented May 29, 2023

Describe the bug

When writing custom validation method to the value object only Validation type is allowed as the return type. Problem is when someone is already using Validation as part of the namespace
image

Steps to reproduce

[ValueObject(typeof(string))] public readonly partial struct DataGroupItemId { private static Vogen.Validation Validate(string input) => string.IsNullOrEmpty(input) ? Vogen.Validation.Invalid($"{nameof(DataGroupItemId)} cannot be empty") : Vogen.Validation.Ok; }

Expected behaviour

Using Vogen.Validation type should also be allowed

image

@kamparR kamparR added the bug Something isn't working label May 29, 2023
@SteveDunn
Copy link
Owner

Oops! Thanks for the bug report - I'll fix that ASAP

@SteveDunn
Copy link
Owner

@kamparR - this should be fixed in version 3.0.18 which I've just pushed to NuGet (should be there shortly).

Thanks again for the report. Let me know if there's any other issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants