# Which validation libraries do you recommend?

**URL:** <https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061>\
**Category:** Questions\
**Created:** [April 16, 2020, 8:43pm UTC](https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061 "2020-04-16T20:43:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashuradev](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@ashuradev](https://discourse.slimframework.com/u/ashuradev)\
**Post date:** [April 16, 2020, 8:43pm UTC](https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061/1 "2020-04-16T20:43:49Z")

</div>

Which validation libraries do you recommend?

---

<div class="post-metadata">

**Author:** ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)\
**Post date:** [April 16, 2020, 9:51pm UTC](https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061/2 "2020-04-16T21:51:58Z")

</div>

I like

> **[vlucas/valitron](https://github.com/vlucas/valitron)**
>
> Valitron is a simple, elegant, stand-alone validation library with NO dependencies - vlucas/valitron

---

<div class="post-metadata">

**Author:** ![ashuradev](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@ashuradev](https://discourse.slimframework.com/u/ashuradev)\
**Post date:** [April 16, 2020, 9:57pm UTC](https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061/3 "2020-04-16T21:57:50Z")

</div>

Do you have a slim application demonstrating integration with this library?

Thanks

---

<div class="post-metadata">

**Author:** ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)\
**Post date:** [April 16, 2020, 10:02pm UTC](https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061/4 "2020-04-16T22:02:44Z")

</div>

Not that is publicly available. I use it in several CRUD type apps as well as one SAAS style app. It is pretty simple and easy to integrate. I have a `getValidator` function in my Models (Eloquent) that returns true/false if the model validates. In my controllers I just check if the model is valid before saving to the DB or tossing back to the user to adjust input.

---

<div class="post-metadata">

**Author:** ![maurobonfietti](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/maurobonfietti/32/1114_2.png) [@maurobonfietti](https://discourse.slimframework.com/u/maurobonfietti)\
**Post date:** [April 17, 2020, 2:29pm UTC](https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061/5 "2020-04-17T14:29:21Z")

</div>

I like respect/validation

> **[Respect/Validation](https://github.com/Respect/Validation)**
>
> The most awesome validation engine ever created for PHP - Respect/Validation

Another library:

> **[Wixel/GUMP](https://github.com/Wixel/GUMP)**
>
> A fast, extensible & stand-alone PHP input validation class that allows you to validate any data - Wixel/GUMP

---

<div class="post-metadata">

**Author:** ![Nelson777](https://avatars.discourse-cdn.com/v4/letter/n/f6c823/32.png) [@Nelson777](https://discourse.slimframework.com/u/Nelson777)\
**Post date:** [March 5, 2024, 5:29pm UTC](https://discourse.slimframework.com/t/which-validation-libraries-do-you-recommend/4061/7 "2024-03-05T17:29:49Z")

</div>

Use my lib: [GitHub - Nelson-Dominici/Slimgry: Slimgry is a validation middleware for the Slim framework, with a validation syntax similar to Laravel.](https://github.com/Nelson-Dominici/Slimgry)
