---
title: "Discussion on \"Using Laravel validation outside of Controllers & Requests\" | Hashnode"
description: "Discussion on \"Using Laravel validation outside of Controllers & Requests\". When you look at the Validator source code in Laravel, you see that it either throws a ValidationException or returns an array of validated attributes:\npublic function validate()\n{\n    throw_if($this->fails(), $this->exception, $this);\n\n    return $t..."
url: "https://hashnode.com/posts/using-laravel-validation-outside-of-controllers-requests/64355d00a673e06ab96b33c4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using Laravel validation outside of Controllers & Requests](https://annissimo.com/using-laravel-validation-outside-of-controllers-requests?utm_source=hashnode&utm_medium=feed)

When you look at the Validator source code in Laravel, you see that it either throws a ValidationException or returns an array of validated attributes: public function validate() { throw\_if($this->fails(), $this->exception, $this); return $t...

Apr 11, 2023 · 7 min read · annissimo.com  
Updated Mar 22, 2024  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)
-   [#validation](https://hashnode.com/tag/validation)

## Written by

[Amadeusz Annissimo](https://hashnode.com/@amade)

@amade · Tallinn, Estonia

  
[View profile](https://hashnode.com/@amade)

Technical Co-Founder

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
