WIP #7 common: removed managing with process, refactored validators#8
Open
WIP #7 common: removed managing with process, refactored validators#8
Conversation
Danilqa
approved these changes
Nov 1, 2020
Danilqa
approved these changes
Nov 1, 2020
| ErrorMessage.ISSUE_PREFIX_ERROR.replace(StringValue.ISSUE_PREFIX, issuePrefix) | ||
| .replace(StringValue.DOC_LINK, config.linkToRule as string) | ||
| ); | ||
| return ErrorMessage.ISSUE_PREFIX_ERROR.replace(StringValue.ISSUE_PREFIX, issuePrefix) |
Collaborator
There was a problem hiding this comment.
I have doubts about it. The more expected behavior is returning true or false. True in success cases. In a more classic way (as I observed), the function returns [result, error]. But these functions are for network interaction.
Contributor
Author
There was a problem hiding this comment.
You are not right if you speak that returning boolean is more classic. Do you have any proofs? Otherwise, you can see any validation lib.
Contributor
Author
There was a problem hiding this comment.
Anyway it depends on your wishes. If you wanna return some specific validation error, it's a good solution. Otherwise, if you are enough boolean, you can change it to boolean.
Co-authored-by: Daniil Sitdikov <hello.boriskas@gmail.com>
Co-authored-by: Daniil Sitdikov <hello.boriskas@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.