# \[dry-validation\] What's your use case?

**URL:** <https://discourse.dry-rb.org/t/dry-validation-whats-your-use-case/812>\
**Category:** dry-validation\
**Created:** [June 25, 2019, 2:24pm UTC](https://discourse.dry-rb.org/t/dry-validation-whats-your-use-case/812 "2019-06-25T14:24:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolas-besnard](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/nicolas-besnard/32/323_2.png) [@nicolas-besnard](https://discourse.dry-rb.org/u/nicolas-besnard)\
**Post date:** [June 25, 2019, 2:24pm UTC](https://discourse.dry-rb.org/t/dry-validation-whats-your-use-case/812/1 "2019-06-25T14:24:41Z")

</div>

I’m using `dry-validation` and I’m really happy about it: I can remove validation from my model and a validation based on business actions (thanks to dry-transaction), and I like it.

However, I’m starting to thing if I should using it everywhere, or only on business actions such as `CreateUser`, `SendEmailToPaidCustomer` etc…

For example, if I have a `ReimburseTimeTable`, should `dry-validation` be responsible to check if it’s time to do the reimbursement?

---

<div class="post-metadata">

**Author:** ![waiting-for-dev](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/waiting-for-dev/32/71_2.png) [@waiting-for-dev](https://discourse.dry-rb.org/u/waiting-for-dev)\
**Post date:** [June 26, 2019, 9:41am UTC](https://discourse.dry-rb.org/t/dry-validation-whats-your-use-case/812/2 "2019-06-26T09:41:07Z")

</div>

As I see it, `dry-validation` and `dry-schema` can help you when you are trying to validate any data that comes from the current state of the world (being it a user input or the current time). If your validations are only related to the type of the data (is it a string? an integer?) or its structure (does this hash have a `foo:` key), then you only need `dry-schema`. If you have to validate business rules, then go with `dry-validation`.

So, for your concrete example, `ReimburseTimeTable`, it depends on the source of the data it consumes. If it comes from the outside, you can use `dry-validation`. If your data is internal but you still want some type safety, you can still use something like `dry-types`.
