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

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

huydang/phalcon-validation
==========================

Advanced validators for PHP Phalcon Framework.

0.1(7y ago)117MITPHPPHP &gt;=7.0

Since Oct 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/huydang284/phalcon-validation)[ Packagist](https://packagist.org/packages/huydang/phalcon-validation)[ RSS](/packages/huydang-phalcon-validation/feed)WikiDiscussions master Synced 2w ago

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

Advanced validators for PHP Phalcon Framework.
==============================================

[](#advanced-validators-for-php-phalcon-framework)

[![License](https://camo.githubusercontent.com/ab5efcfc3428c527e3d1e502ebbd7695ace19e0b0230cb4e83b6296c3e9bb942/68747470733a2f2f706f7365722e707567782e6f72672f6d696368656c652d616e67696f6e692f7068616c636f6e2d76616c696461746f72732f6c6963656e7365)](https://packagist.org/packages/michele-angioni/phalcon-validators)[![Build Status](https://camo.githubusercontent.com/dd3611089e091e459c4adb468f665744052a62a252d857e824fbb24f574a8d52/68747470733a2f2f7472617669732d63692e6f72672f68757964616e673238342f7068616c636f6e2d76616c69646174696f6e2e737667)](https://travis-ci.org/huydang284/phalcon-validators)

Introduction
------------

[](#introduction)

Advanced Validators adds several new validators to support Phalcon Framework.

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

[](#installation)

Install via composer

```
composer require huydang/phalcon-validation

```

Supported Validators
--------------------

[](#supported-validators)

- [Min](#min)
- [Max](#max)
- [AlphaDash](#alphadash)
- [In](#in)
- [NotIn](#notin)
- [IpV4](#ipv4)
- [IpV6](#ipv6)
- [Json](#json)
- [Filled](#filled)
- [Timezone](#timezone)
- [Image](#image)

### Min

[](#min)

The field under validation must have a minimum value. For string data, value corresponds to the number of characters. For numeric data, value corresponds to a given integer value. For an array, size corresponds to the count of the array.

```
use \HuyDang\PhalconValidation\Validator\Min;

$validation = new Validation();
$validation->add('field',
    new Min([
        'min' => $min,
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### Max

[](#max)

The field under validation must be less than or equal to a maximum value. For string data, value corresponds to the number of characters. For numeric data, value corresponds to a given integer value. For an array, size corresponds to the count of the array.

```
use \HuyDang\PhalconValidation\Validator\Max;

$validation = new Validation();
$validation->add('field',
    new Max([
        'max' => $max,
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### AlphaDash

[](#alphadash)

The field under validation may have alpha-numeric characters, as well as dashes and underscores.

```
use \HuyDang\PhalconValidation\Validator\AlphaDash;

$validation = new Validation();
$validation->add('field',
    new AlphaDash([
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### In

[](#in)

The field under validation must be included in the given list of values.

```
use \HuyDang\PhalconValidation\Validator\In;

$validation = new Validation();
$validation->add('field',
    new In([
        'in' => [1, 2, 3],
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### NotIn

[](#notin)

The field under validation must not be included in the given list of values.

```
use \HuyDang\PhalconValidation\Validator\NotIn;

$validation = new Validation();
$validation->add('field',
    new NotIn([
        'not_in' => [1, 2, 3],
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### IpV4

[](#ipv4)

The field under validation must be an IPv4 address.

```
use \HuyDang\PhalconValidation\Validator\IpV4;

$validation = new Validation();
$validation->add('field',
    new IpV4([
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### IpV6

[](#ipv6)

The field under validation must be an IPv6 address.

```
use \HuyDang\PhalconValidation\Validator\IpV6;

$validation = new Validation();
$validation->add('field',
    new IpV6([
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### Json

[](#json)

The field under validation must be a valid JSON string.

```
use \HuyDang\PhalconValidation\Validator\Json;

$validation = new Validation();
$validation->add('field',
    new Json([
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### Filled

[](#filled)

The field under validation must not be empty when it is present.

```
use \HuyDang\PhalconValidation\Validator\Filled;

$validation = new Validation();
$validation->add('field',
    new Filled([
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $field
]);

if ($messages->count() > 0) {
    // field is not passed
} else {
    // field is passed
}
```

### Timezone

[](#timezone)

The field under validation must be a valid timezone identifier according to the `timezone_identifiers_list` PHP function.

```
use \HuyDang\PhalconValidation\Validator\Timezone;

$validation = new Validation();
$validation->add('field',
    new Timezone([
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'field' => $timezone
]);

if ($messages->count() > 0) {
    // invalid timezone
} else {
    // valid timezone
}
```

### Image

[](#image)

The file under validation must be an image.

```
use \HuyDang\PhalconValidation\Validator\Image;

$validation = new Validation();
$validation->add('file',
    new Image([
        'message' => 'Error message'
    ]));

$messages = $validation->validate([
    'file' => $file
]);

if ($messages->count() > 0) {
    // not an image
} else {
    // valid image
}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

2824d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3423199?v=4)[huydang](/maintainers/huydang)[@huydang](https://github.com/huydang)

---

Top Contributors

[![huydang284](https://avatars.githubusercontent.com/u/22060382?v=4)](https://github.com/huydang284 "huydang284 (14 commits)")

---

Tags

phalconvalidationvalidatorvalidatorsvalidatorvalidationphalcon

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[respect/validation

The most awesome validation engine ever created for PHP

6.0k39.0M407](/packages/respect-validation)[opis/json-schema

Json Schema Validator for PHP

65141.2M263](/packages/opis-json-schema)[vlucas/valitron

Simple, elegant, stand-alone validation library with NO dependencies

1.6k4.6M135](/packages/vlucas-valitron)[intervention/validation

Additional validation rules for the Laravel framework

6777.1M18](/packages/intervention-validation)[proengsoft/laravel-jsvalidation

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

1.1k2.3M50](/packages/proengsoft-laravel-jsvalidation)[wixel/gump

A fast, extensible &amp; stand-alone PHP input validation class that allows you to validate any data.

1.2k1.4M31](/packages/wixel-gump)

PHPackages © 2026

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