PHPackages                             sphoton/validation - 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. sphoton/validation

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

sphoton/validation
==================

Validation for Laravel Framework

v1.0.5(2y ago)03.0kMITPHPPHP ^8.1

Since Mar 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sphotontechnology/laravel-validation)[ Packagist](https://packagist.org/packages/sphoton/validation)[ RSS](/packages/sphoton-validation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

[![Laravel Logo](https://camo.githubusercontent.com/ab07017fb7996ad2e5118f576aa9ee36e07cf5bc7b50c200ddfe128d6374d1a0/68747470733a2f2f7370686f746f6e2e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032302f31322f7370686f746f6e2d6c6f676f2d626c61636b2e706e67)](https://github.com/sphotontechnology)

 [![Total Downloads](https://camo.githubusercontent.com/ca83d8aa158a44fc9fe66467c377fc9e2d95effa24569df5bb279ce4abc1bb74/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370686f746f6e2f76616c69646174696f6e)](https://packagist.org/packages/sphoton/validation) [![Latest Stable Version](https://camo.githubusercontent.com/bd4784be5a5edf9c4fa76b21023e0078f8b63f681ed439e0eb9fbdb88f8d9e4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370686f746f6e2f76616c69646174696f6e)](https://packagist.org/packages/sphoton/validation) [![License](https://camo.githubusercontent.com/3fabd26ca8a582617c33c72fb53267ac830d669d61b95aa702bc560a17e78973/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7370686f746f6e2f76616c69646174696f6e)](https://packagist.org/packages/sphoton/validation)

About
-----

[](#about)

Provide additional validation rules to support Vietnamese testing for Laravel.

Condition
---------

[](#condition)

- Laravel 8.x or later
- PHP 8.1 or later

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

[](#installation)

You can install the package via composer:

```
composer require sphoton/validation
```

Available Rules
---------------

[](#available-rules)

- `VietnameseRule`: The field under validation must be entirely in Vietnamese.
- `VietnameseNumberRule`: The field under validation must be entirely in Vietnamese and number.

Usage
-----

[](#usage)

You can use the validation rules in your Laravel application like this:

```
use Sphoton\Validation\Rules\VietnameseRule;
use Sphoton\Validation\Rules\VietnameseNumberRule;

$request->validate([
    'name'      => ['required', 'string', new VietnameseRule],
    'address'   => ['required', 'string', new VietnameseNumberRule],
]);
```

```
use Sphoton\Validation\Rules\VietnameseRule;
"Nguyen Van A"          // Pass
"Nguyễn Văn A"          // Pass
"Nguyễn Văn A 123"      // Fail
"123 Nguyễn Văn A"      // Fail
"Nguyễn Văn A @"        // Fail
"Nguyễn Văn A 123 @"    // Fail
"Nguyễn Văn
A"                      // Fail
"Nguyễn Văn \nA"        // Fail

use Sphoton\Validation\Rules\VietnameseNumberRule;
"Nguyen Van A"          // Pass
"Nguyễn Văn A 123"      // Pass
"123 Nguyễn Văn A"      // Pass
"Nguyễn Văn A @"        // Fail
"Nguyễn Văn A 123 @"    // Fail
"Nguyễn Văn
A"                      // Fail
"Nguyễn Văn \nA"        // Fail
```

Contributors
------------

[](#contributors)

   [ ![Hoàng](https://avatars.githubusercontent.com/u/63985216?v=4)
 **Hoàng Khắc Phúc** ](https://github.com/hoangkhacphuc)   [ ![DNT/](https://avatars.githubusercontent.com/u/72369814?v=4)
 **DNT** ](https://github.com/ducconit)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

6

Last Release

788d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/73d1abf0b6d9c4b1c4143e011b7748c49662320f9a31d375583770105800b49d?d=identicon)[hoangkhacphuc](/maintainers/hoangkhacphuc)

---

Top Contributors

[![hoangkhacphuc](https://avatars.githubusercontent.com/u/63985216?v=4)](https://github.com/hoangkhacphuc "hoangkhacphuc (8 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sphoton-validation/health.svg)

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

###  Alternatives

[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

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