PHPackages                             hypejunction/hypeprototypervalidators - 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. hypejunction/hypeprototypervalidators

AbandonedArchivedElgg-plugin[Validation &amp; Sanitization](/categories/validation)

hypejunction/hypeprototypervalidators
=====================================

hypePrototyper validation rules

4.2.2(10y ago)0186GPL-2.0PHP

Since Aug 11Pushed 7y ago2 watchersCompare

[ Source](https://github.com/hypeJunction/hypePrototyperValidators)[ Packagist](https://packagist.org/packages/hypejunction/hypeprototypervalidators)[ Docs](http://hypejunction.com)[ RSS](/packages/hypejunction-hypeprototypervalidators/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (6)Used By (0)

hypePrototyper Validators
=========================

[](#hypeprototyper-validators)

Predefined Validators
---------------------

[](#predefined-validators)

### `type`

[](#type)

Asserts that user input is expected to be of a certain type.

- `string`
- `alnum` - allows only alphanumeric characters and whitespaces
- `alpha` - allows only alpha characters and whitespaces
- `int` - allow only integer values
- `numeric` - allows numeric values
- `date` - allows date/time strings and objects
- `url` - allows only valid URLs
- `email` - allows only valid email addresses

```
	$field = array(
		'type' => 'text',
		'validation_rules' => array(
			'type' => 'alnum',
		),
	);
```

### `min` and `max`

[](#min-and-max)

Asserts that user input is between min and max values

```
	$field = array(
		'type' => 'text',
		'validation_rules' => array(
			'type' => 'int',
			'min' => 10,
			'max' => 20,
		),
	);
```

### `minlength` and `maxlength`

[](#minlength-and-maxlength)

Asserts that the length of user input is between min and max values

```
	$field = array(
		'type' => 'password',
		'validation_rules' => array(
			'type' => 'string',
			'minlength' => 6,
			'maxlength' => 25,
		),
	);
```

### `contains`

[](#contains)

Asserts that user input contains a predefined string

```
	$field = array(
		'type' => 'text',
		'validation_rules' => array(
			'type' => 'string',
			'contains' => 'hello world',
		),
	);
```

### `regex`

[](#regex)

Asserts that user input matches a regex pattern

```
	$field = array(
		'type' => 'time',
		'validation_rules' => array(
			'type' => 'string',
			'regex' => '^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$',
		),
	);
```

Custom Validators
-----------------

[](#custom-validators)

You can define custom validation rules, using the following pattern:

```
// Callback for validating user input
elgg_register_plugin_hook_handler('validate:my_rule', 'prototyper', 'my_callback');

// Register the validation rule to make it available in hypePrototyperUI
hypePrototyper()->config->registerValidationRule('my_rule');
```

Client-Side Validation
----------------------

[](#client-side-validation)

Partial client-side validation is available through Parsley.js. Do enable validation, add `data-parsley-validate` to your form attributes.

```
echo elgg_view_form('my_prototyped_form', array(
	'enctype' => 'multipart/form-data',
	'data-parsley-validate' => true,
), $vars);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~373 days

Total

4

Last Release

2804d ago

Major Versions

4.2.2 → 5.x-dev2018-09-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/5071b1cd852e094b3f564962a625e04c227adc73af30c5b46b243ab8f20154a7?d=identicon)[hypeJunction](/maintainers/hypeJunction)

---

Top Contributors

[![hypeJunction](https://avatars.githubusercontent.com/u/1202761?v=4)](https://github.com/hypeJunction "hypeJunction (13 commits)")

---

Tags

pluginelggvalidatorsFormsprototypes

### Embed Badge

![Health badge](/badges/hypejunction-hypeprototypervalidators/health.svg)

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

###  Alternatives

[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M446](/packages/nette-forms)[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.4M7](/packages/karser-karser-recaptcha3-bundle)[pear/html_quickform2

Provides methods to create, validate and render HTML forms in PHP.

24498.9k2](/packages/pear-html-quickform2)[chrisshick/cakephp3-html-purifier

This is a CakePHP3 Purifier Plugin Behavior that cleanses data before it is marshalled into the entity.

12168.1k](/packages/chrisshick-cakephp3-html-purifier)[hybridlogic/validation

A simple, extensible validation library for PHP with support for filtering and validating any input array along with generating client side validation code.

641.1k](/packages/hybridlogic-validation)

PHPackages © 2026

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