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

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

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

hypePrototyper validation rules

7.0.2(1w ago)0196GPL-2.0-or-laterPHPPHP &gt;=8.3CI failing

Since Aug 11Pushed 3w ago2 watchersCompare

[ Source](https://github.com/hypeJunction/hypePrototyperValidators)[ Packagist](https://packagist.org/packages/hypejunction/hypeprototypervalidators)[ Docs](https://github.com/hypeJunction/hypePrototyperValidators)[ RSS](/packages/hypejunction-hypeprototypervalidators/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (12)Versions (19)Used By (0)

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

[](#hypeprototyper-validators)

[![Elgg 7.x](https://camo.githubusercontent.com/959475d1d91761b2e3ed85398ae1ebe9536a48c724e92bef53e7e2027c3d3627/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d372e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/959475d1d91761b2e3ed85398ae1ebe9536a48c724e92bef53e7e2027c3d3627/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d372e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)

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);
```

Compatibility
-------------

[](#compatibility)

Plugin versionElgg version7.0.07.x6.0.06.x5.0.05.x4.0.04.x3.0.03.x

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance97

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

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

Recently: every ~11 days

Total

11

Last Release

9d ago

Major Versions

4.2.2 → 5.x-dev2018-09-05

4.0.0 → 5.0.02026-05-09

5.0.0 → 7.0.02026-05-10

3.0.0 → 7.0.12026-06-10

PHP version history (4 changes)4.0.0PHP &gt;=7.4

5.0.0PHP &gt;=8.2

7.0.0PHP &gt;=8.3

3.0.0PHP &gt;=7.2

### 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 (40 commits)")

---

Tags

elggelgg-pluginphppluginelggvalidatorsFormsprototypes

### 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

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)

PHPackages © 2026

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