PHPackages                             mugomes/mgformvalidation - 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. mugomes/mgformvalidation

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

mugomes/mgformvalidation
========================

1.0.0(1mo ago)07↑328.6%1LGPL-2.1-onlyPHPPHP &gt;=8.4.0

Since Apr 28Pushed 1mo agoCompare

[ Source](https://github.com/mugomes/mgformvalidation)[ Packagist](https://packagist.org/packages/mugomes/mgformvalidation)[ RSS](/packages/mugomes-mgformvalidation/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)DependenciesVersions (2)Used By (0)

MGFormValidation
================

[](#mgformvalidation)

Validação de Formulário em PHP sem redirecionamento para POST e GET.

---

📦 Instalação
------------

[](#-instalação)

### Via Composer (recomendado)

[](#via-composer-recomendado)

```
composer require mugomes/mgformvalidation
```

### Manual

[](#manual)

Copie o arquivo `mgformvalidation.php` para o seu projeto e faça a inclusão.

---

Exemplo de Uso
--------------

[](#exemplo-de-uso)

```
if (getenv('REQUEST_METHOD') == 'POST') {
    $mgformvalidation = new mgformvalidation();

    $mgformvalidation->rules([
        'nome' => 'required|min:3|max:5',
        'email' => 'required|email'
    ])->json();

    $mgformvalidation->success(function () {
        echo json_encode(['success' => 'Formulário com dados enviados!']);
    });
}

echo '
.mgformvalidation-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 4px;
}

.mgformvalidation-success {
    color: #22c55e;
    margin-top: 15px;
    text-align: center;
}
';

echo mgformvalidation::form('post', '');
echo 'Contato';

echo '';
echo mgformvalidation::dataError('mgformvalidation-error', 'nome');

echo '';
echo mgformvalidation::dataError('mgformvalidation-error', 'email');

echo 'Enviar';

echo mgformvalidation::dataSuccess('mgformvalidation-success');
echo mgformvalidation::endForm();

echo mgformvalidation::scripts();
```

---

💙 Apoie
-------

[](#-apoie)

- GitHub:
- More:

👤 Autor
-------

[](#-autor)

**Murilo Gomes Julio**

🔗

📺

---

License
-------

[](#license)

The MGFormValidation is provided under:

[SPDX-License-Identifier: LGPL-2.1-only](https://github.com/mugomes/mgformvalidation/blob/main/LICENSE)

Beign under the terms of the GNU Lesser General Public License version 2.1 only.

All contributions to the MGFormValidation are subject to this license.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance92

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

43d ago

### Community

Maintainers

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

---

Top Contributors

[![bluiceoficial](https://avatars.githubusercontent.com/u/214032302?v=4)](https://github.com/bluiceoficial "bluiceoficial (7 commits)")

### Embed Badge

![Health badge](/badges/mugomes-mgformvalidation/health.svg)

```
[![Health](https://phpackages.com/badges/mugomes-mgformvalidation/health.svg)](https://phpackages.com/packages/mugomes-mgformvalidation)
```

###  Alternatives

[ziming/laravel-zxcvbn

Zxcvbn Password validation rule for Laravel

3064.3k](/packages/ziming-laravel-zxcvbn)

PHPackages © 2026

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