PHPackages                             jakesutherland/nomad-validate - 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. jakesutherland/nomad-validate

ActiveLibrary

jakesutherland/nomad-validate
=============================

A WordPress PHP Composer Package that provides you with an easy way to validate data against a set of rules and generate error messages.

1.1.0(4y ago)0171MITPHP

Since Aug 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jakesutherland/nomad-validate)[ Packagist](https://packagist.org/packages/jakesutherland/nomad-validate)[ Docs](https://jakesutherland.com)[ RSS](/packages/jakesutherland-nomad-validate/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

Nomad Validate
==============

[](#nomad-validate)

A WordPress PHP Composer Package that provides you with an easy way to validate data against a set of rules and generate error messages.

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

[](#installation)

You can install Nomad Validate in your project by using composer.

```
$ composer require jakesutherland/nomad-validate

```

Dependencies
------------

[](#dependencies)

Nomad Validate depends on [Nomad Helpers](https://github.com/jakesutherland/nomad-helpers) for various functions and utilities and needs to be installed in order to run.

If for some reason you didn't install Nomad Validate via Composer as a required package in your project, you will still need to run `composer install` to install it's dependencies as they are not included in the repository.

Documentation
-------------

[](#documentation)

Nomad Validate has one simple function that you can use to validate data against a set of rules.

### Example Usage

[](#example-usage)

Each data item must have each of the following arguments: `key`, `label`, `value`, and `rules`.

You can optionally overwrite rule error messages through the `error_messages` argument and specify the rule key and your custom message. You can see this in the `terms` example below.

```
