Skip to content
This repository has been archived by the owner on Feb 11, 2019. It is now read-only.

ReadOnly builders must have a validation method #3

Open
octonato opened this issue Sep 28, 2017 · 2 comments
Open

ReadOnly builders must have a validation method #3

octonato opened this issue Sep 28, 2017 · 2 comments

Comments

@octonato
Copy link
Member

As explained by @ignasi35 here: #2 (review)

@ignasi35
Copy link

Please, review my further comments on that review. I don't think validation should be a separate concern.

@octonato
Copy link
Member Author

Yes, that was my point for Command Handlers that do emit events.

That is not valid for a ReadOnly. We may need something that block the execution of the command, hence the validate method.

We can't do it in the replyWith method because we only have access to the State, not the Command. Otherwise we could throw an exception in the replyWith.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants