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

ActiveLibrary

eden/validation
===============

Eden validation component.

4.0.1(10y ago)08.4k1MITPHPPHP &gt;=5.4.1

Since Sep 24Pushed 10y ago12 watchersCompare

[ Source](https://github.com/Eden-PHP/Validation)[ Packagist](https://packagist.org/packages/eden/validation)[ Docs](http://eden-php.com)[ RSS](/packages/eden-validation/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (1)

[![logo](https://camo.githubusercontent.com/683ba05b2b51f50045c674b19a4f0ceb30702a8ab495623be7c02e07ab226f08/687474703a2f2f6564656e2e6f70656e6f766174652e636f6d2f6173736574732f696d616765732f636c6f75642d736f6369616c2e706e67)](https://camo.githubusercontent.com/683ba05b2b51f50045c674b19a4f0ceb30702a8ab495623be7c02e07ab226f08/687474703a2f2f6564656e2e6f70656e6f766174652e636f6d2f6173736574732f696d616765732f636c6f75642d736f6369616c2e706e67) Eden Validation
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-eden-validation)

[![Build Status](https://camo.githubusercontent.com/38948a49419a0dba34cb04a68ccf50f1d13e00d384ea30667a947b6675a3e987/68747470733a2f2f6170692e7472617669732d63692e6f72672f4564656e2d5048502f56616c69646174696f6e2e737667)](https://travis-ci.org/Eden-PHP/Validation)
====================================================================================================================================================================================================================================================================

[](#)

- [Install](#install)
- [Introduction](#intro)
- [API](#api)
    - [isType](#isType)
    - [greaterThan](#greaterThan)
    - [greaterThanEqualTo](#greaterThanEqualTo)
    - [lessThan](#lessThan)
    - [lessThanEqualTo](#lessThanEqualTo)
    - [lengthGreaterThan](#lengthGreaterThan)
    - [lengthGreaterThanEqualTo](#lengthGreaterThanEqualTo)
    - [lengthLessThan](#lengthLessThan)
    - [lengthLessThanEqualTo](#lengthLessThanEqualTo)
    - [notEmpty](#notEmpty)
    - [startsWithLetter](#startsWithLetter)
    - [alphaNumeric](#alphaNumeric)
    - [alphaNumericUnderScore](#alphaNumericUnderScore)
    - [alphaNumericHyphen](#alphaNumericHyphen)
    - [alphaNumericLine](#alphaNumericLine)
    - [set](#set)
- [Contributing](#contributing)

====

Install
-------

[](#install)

`composer install eden/validation`

====

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

[](#introduction)

Instantiate validation in this manner.

```
$validation = eden('validation', 'foobar');

```

====

API
---

[](#api)

====

### isType

[](#istype)

Returns true if the value is a given type

#### Usage

[](#usage)

```
eden('validation', 'foo')->isType(*string $type, bool $soft);

```

#### Parameters

[](#parameters)

- `*string $type` - The data type to check for
- `bool $soft` - This is like == vs ===

Returns `bool`

#### Example

[](#example)

*Example 1*

```
eden('validation', 'foo')->isType('email');

```

*Example 2*

```
eden('validation', 'foo')->isType('url');

```

*Example 3*

```
eden('validation', 'foo')->isType('hex');

```

*Example 4*

```
eden('validation', 'foo')->isType('cc');

```

*Example 5*

```
eden('validation', 'foo')->isType('int');

```

*Example 6*

```
eden('validation', 'foo')->isType('float');

```

*Example 7*

```
eden('validation', 'foo')->isType('bool');

```

====

### greaterThan

[](#greaterthan)

Returns true if the value is greater than the passed argument

#### Usage

[](#usage-1)

```
eden('validation', 'foo')->greaterThan(*int $number);

```

#### Parameters

[](#parameters-1)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-1)

```
eden('validation', 'foo')->greaterThan(123);

```

====

### greaterThanEqualTo

[](#greaterthanequalto)

Returns true if the value is greater or equal to than the passed argument

#### Usage

[](#usage-2)

```
eden('validation', 'foo')->greaterThanEqualTo(*int $number);

```

#### Parameters

[](#parameters-2)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-2)

```
eden('validation', 'foo')->greaterThanEqualTo(123);

```

====

### lessThan

[](#lessthan)

Returns true if the value is less than the passed argument

#### Usage

[](#usage-3)

```
eden('validation', 'foo')->lessThan(*int $number);

```

#### Parameters

[](#parameters-3)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-3)

```
eden('validation', 'foo')->lessThan(123);

```

====

### lessThanEqualTo

[](#lessthanequalto)

Returns true if the value is less than or equal the passed argument

#### Usage

[](#usage-4)

```
eden('validation', 'foo')->lessThanEqualTo(*int $number);

```

#### Parameters

[](#parameters-4)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-4)

```
eden('validation', 'foo')->lessThanEqualTo(123);

```

====

### lengthGreaterThan

[](#lengthgreaterthan)

Returns true if the value length is greater than the passed argument

#### Usage

[](#usage-5)

```
eden('validation', 'foo')->lengthGreaterThan(*int $number);

```

#### Parameters

[](#parameters-5)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-5)

```
eden('validation', 'foo')->lengthGreaterThan(123);

```

====

### lengthGreaterThanEqualTo

[](#lengthgreaterthanequalto)

Returns true if the value length is greater than or equal to the passed argument

#### Usage

[](#usage-6)

```
eden('validation', 'foo')->lengthGreaterThanEqualTo(*int $number);

```

#### Parameters

[](#parameters-6)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-6)

```
eden('validation', 'foo')->lengthGreaterThanEqualTo(123);

```

====

### lengthLessThan

[](#lengthlessthan)

Returns true if the value length is less than the passed argument

#### Usage

[](#usage-7)

```
eden('validation', 'foo')->lengthLessThan(*int $number);

```

#### Parameters

[](#parameters-7)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-7)

```
eden('validation', 'foo')->lengthLessThan(123);

```

====

### lengthLessThanEqualTo

[](#lengthlessthanequalto)

Returns true if the value length is less than or equal to the passed argument

#### Usage

[](#usage-8)

```
eden('validation', 'foo')->lengthLessThanEqualTo(*int $number);

```

#### Parameters

[](#parameters-8)

- `*int $number` - Number to test against

Returns `bool`

#### Example

[](#example-8)

```
eden('validation', 'foo')->lengthLessThanEqualTo(123);

```

====

### notEmpty

[](#notempty)

Returns true if the value is not empty

#### Usage

[](#usage-9)

```
eden('validation', 'foo')->notEmpty();

```

#### Parameters

[](#parameters-9)

Returns `bool`

====

### startsWithLetter

[](#startswithletter)

Returns true if the value starts with a specific letter

#### Usage

[](#usage-10)

```
eden('validation', 'foo')->startsWithLetter();

```

#### Parameters

[](#parameters-10)

Returns `bool`

====

### alphaNumeric

[](#alphanumeric)

Returns true if the value is alpha numeric

#### Usage

[](#usage-11)

```
eden('validation', 'foo')->alphaNumeric();

```

#### Parameters

[](#parameters-11)

Returns `bool`

====

### alphaNumericUnderScore

[](#alphanumericunderscore)

Returns true if the value is alpha numeric underscore

#### Usage

[](#usage-12)

```
eden('validation', 'foo')->alphaNumericUnderScore();

```

#### Parameters

[](#parameters-12)

Returns `bool`

====

### alphaNumericHyphen

[](#alphanumerichyphen)

Returns true if the value is alpha numeric hyphen

#### Usage

[](#usage-13)

```
eden('validation', 'foo')->alphaNumericHyphen();

```

#### Parameters

[](#parameters-13)

Returns `bool`

====

### alphaNumericLine

[](#alphanumericline)

Returns true if the value is alpha numeric hyphen or underscore

#### Usage

[](#usage-14)

```
eden('validation', 'foo')->alphaNumericLine();

```

#### Parameters

[](#parameters-14)

Returns `bool`

====

### set

[](#set)

Sets the value to be validated

#### Usage

[](#usage-15)

```
eden('validation', 'foo')->set(*mixed $value);

```

#### Parameters

[](#parameters-15)

- `*mixed $value` - value

Returns `Eden\Validation\Index`

#### Example

[](#example-9)

```
eden('validation', 'foo')->set($value);

```

====

\#Contributing to Eden

Contributions to *Eden* are following the Github work flow. Please read up before contributing.

\##Setting up your machine with the Eden repository and your fork

1. Fork the repository
2. Fire up your local terminal create a new branch from the `v4` branch of your fork with a branch name describing what your changes are. Possible branch name types:
    - bugfix
    - feature
    - improvement
3. Make your changes. Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")

\##Making pull requests

1. Please ensure to run `phpunit` before making a pull request.
2. Push your code to your remote forked version.
3. Go back to your forked version on GitHub and submit a pull request.
4. An Eden developer will review your code and merge it in when it has been classified as suitable.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~195 days

Total

5

Last Release

3836d ago

Major Versions

1.0.3 → 4.0.12015-10-13

PHP version history (2 changes)1.0.2PHP &gt;=5.3.1

4.0.1PHP &gt;=5.4.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120378?v=4)[Christian Blanquera](/maintainers/cblanquera)[@cblanquera](https://github.com/cblanquera)

---

Top Contributors

[![clark21](https://avatars.githubusercontent.com/u/5639521?v=4)](https://github.com/clark21 "clark21 (7 commits)")[![Sherlonv](https://avatars.githubusercontent.com/u/5492326?v=4)](https://github.com/Sherlonv "Sherlonv (1 commits)")

---

Tags

libraryeden

### Embed Badge

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

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

###  Alternatives

[eden/mail

Eden POP3, IMAP and SMTP component

178273.4k1](/packages/eden-mail)[eden/sqlite

Eden SQLite Search, Collection, Model ORM componen

199.2k2](/packages/eden-sqlite)

PHPackages © 2026

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