Skip to content

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.

3 participants