PHPackages                             proghasan/blade-form-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. proghasan/blade-form-validator

AbandonedArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

proghasan/blade-form-validator
==============================

Validate Laravel forms, from Blade files

v1.0.1(1y ago)11MITPHPPHP ^8.2.0

Since Jun 5Pushed 1y agoCompare

[ Source](https://github.com/proghasan/blade-form-validator)[ Packagist](https://packagist.org/packages/proghasan/blade-form-validator)[ RSS](/packages/proghasan-blade-form-validator/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

BladeFormValidator
==================

[](#bladeformvalidator)

A Laravel package for form validation using validation rules defined directly inside Blade form inputs via a `validated` attribute.
This package extracts validation rules from Blade views automatically, simplifying controller validation logic.

---

Features
--------

[](#features)

- Define validation rules inside your Blade form inputs using `validated` attributes.
- Use a custom FormRequest class that automatically extracts rules from your Blade form.
- Supports nested input names (`name="user[email]"`) and converts them to dot notation (`user.email`).
- Configurable default form view or automatic form view detection from route names.
- Easy to extend by subclassing the base `BladeFormValidateRequest`.

---

Installation
------------

[](#installation)

Require the package via Composer:

```
composer require proghasan/blade-form-validator
```

Usage
-----

[](#usage)

### 1. Defining Validation Rules in Blade Views

[](#1-defining-validation-rules-in-blade-views)

Add `validated` attributes to your form inputs:

```

    @csrf

    Register

```

### 2. Using the built-in FormRequest

[](#2-using-the-built-in-formrequest)

Use the provided FormRequest class in your controller methods to validate input automatically.

```
use Proghasan\BladeFormValidator\Requests\BladeFormValidateRequest;

class RegisterController extends Controller
{
    public function store(BladeFormValidateRequest $request)
    {
        // Validation is automatically performed based on your form's Blade view rules

        $validated = $request->validated();

        // Proceed with validated data...
    }
}
```

### 3. Route Default `formView` Syntax

[](#3-route-default-formview-syntax)

If you need to explicitly specify a form view for a route, use **route defaults**:

```
Route::post('/register', [RegisterController::class, 'store'])
    ->name('register.form')
    ->defaults('formView', 'forms.register');
```

### 4. Customizing the Form View

[](#4-customizing-the-form-view)

By default, the package tries to find the Blade view from the current route name, converting dots to slashes. If your route or view folder naming differs, set the `$formView` property in a subclassed FormRequest:

```
use Proghasan\BladeFormValidator\Requests\BladeFormValidateRequest;

class RegisterFormRequest extends BladeFormValidateRequest
{
    // Specify the form view explicitly
    protected string $formView = 'forms.register';
}
```

Then use your custom request in the controller:

```
public function store(RegisterFormRequest $request)
{
    $validated = $request->validated();
    // ...
}
```

How It Works
------------

[](#how-it-works)

- The package renders the specified Blade form view.
- It parses all ``, ``, and `` elements to extract `name` and `validated` attributes.
- Converts array-style input names like `user[email]` to dot notation (`user.email`).
- Uses Laravel’s validation engine with the extracted rules.

### License

[](#license)

This package is open-sourced software licensed under the MIT license.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance47

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

393d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a00d491e9e54a544418291e422e1bae3ed308dbf68647503cc8100414fe9d160?d=identicon)[proghasan](/maintainers/proghasan)

---

Top Contributors

[![proghasan](https://avatars.githubusercontent.com/u/31874131?v=4)](https://github.com/proghasan "proghasan (10 commits)")

---

Tags

laravelvalidationform validationblade-form-validatorlarave-form-validationlarave-form-validator

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/proghasan-blade-form-validator/health.svg)

```
[![Health](https://phpackages.com/badges/proghasan-blade-form-validator/health.svg)](https://phpackages.com/packages/proghasan-blade-form-validator)
```

###  Alternatives

[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel

3893.6M1](/packages/axlon-laravel-postal-code-validation)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

762649.9k18](/packages/wendelladriel-laravel-validated-dto)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2462.4M7](/packages/laravel-validation-rules-credit-card)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

183530.2k](/packages/illuminatech-validation-composite)[sandermuller/laravel-fluent-validation

Fluent validation rule builders for Laravel

20518.8k4](/packages/sandermuller-laravel-fluent-validation)[romegasoftware/laravel-schema-generator

Generate TypeScript Zod validation schemas from Laravel validation rules

3219.4k](/packages/romegasoftware-laravel-schema-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
