Skip to content

WIP #7 common: removed managing with process, refactored validators #8

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

derlagg
Copy link
Contributor

@derlagg derlagg commented Oct 31, 2020

No description provided.

@derlagg derlagg requested a review from Danilqa October 31, 2020 15:12
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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

derlagg and others added 2 commits November 1, 2020 09:55
Co-authored-by: Daniil Sitdikov <hello.boriskas@gmail.com>
Co-authored-by: Daniil Sitdikov <hello.boriskas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants