kittinunf/Result

What about adding a label to each validation?

sergiofigueras opened this issue · 1 comments

Hello guys,

I've some validations like:

    val factoryIdExists: Result<Long, Exception> = Result.of(productDto.factory.factoryId)
    val factoryExists: Result<FactoryDto, Exception> = 
    Result.of(factoryService.getFactory(factoryIdExists.get()))
    val validations = Validation(factoryIdExists, factoryExists)

What if we could add a label to each validation, so, it would be easier to present the validation that failed to an API client, for example. Do you think that it would be worth? If so, I can design it.

Thanks!

I think we might not wanna support this directly from the library.