PHPackages                             coderavine/sparta - 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. coderavine/sparta

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

coderavine/sparta
=================

PHP Library for Effortless Input Validation

1.0.1(9y ago)630MITPHPPHP &gt;=5.6.0

Since Jul 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/coderavine/sparta)[ Packagist](https://packagist.org/packages/coderavine/sparta)[ Docs](https://github.com/coderavine/sparta)[ RSS](/packages/coderavine-sparta/feed)WikiDiscussions master Synced 2mo ago

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

[![Sparta Logo](docs/logo.png)](docs/logo.png)

[![Build Status](https://camo.githubusercontent.com/aef57a7692eef1f35f47c3aafe6ebbc1e72f1722cdcd9ffe26474f92460eae26/68747470733a2f2f7472617669732d63692e6f72672f636f6465726176696e652f7370617274612e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/aef57a7692eef1f35f47c3aafe6ebbc1e72f1722cdcd9ffe26474f92460eae26/68747470733a2f2f7472617669732d63692e6f72672f636f6465726176696e652f7370617274612e7376673f6272616e63683d6d6173746572)[![Latest Stable Version](https://camo.githubusercontent.com/fe57d6685d9bb8976384f72bac3c9676add72ddd5c247918f9c1492da319d136/68747470733a2f2f706f7365722e707567782e6f72672f636f6465726176696e652f7370617274612f762f737461626c65)](https://packagist.org/packages/coderavine/sparta)[![Total Downloads](https://camo.githubusercontent.com/e1d22f8ae039c843751ea2883f49727bfa413d6ad75bd2c87d34511e302a9f23/68747470733a2f2f706f7365722e707567782e6f72672f636f6465726176696e652f7370617274612f646f776e6c6f616473)](https://packagist.org/packages/coderavine/sparta)[![License](https://camo.githubusercontent.com/77b26f8a4862605c5ce45b64e7d343acc0d7919f59e1cf2f49a2413571c6f30c/68747470733a2f2f706f7365722e707567782e6f72672f636f6465726176696e652f7370617274612f6c6963656e7365)](https://packagist.org/packages/coderavine/sparta)\#Introduction

**Sparta** is a simple, elegant, and easy to use stand-alone PHP library for effortless inputs validation. Sparta uses simple, straightforward validation techniques that attempt to take the pain out of development by easing common validation tasks used in the majority of web projects. If you are looking for implementing reliable, effective, quick validations and a library that can be extended easily to fit your needs, then **Sparta** is definitely for you.

\#Installation

You can install and update **Sparta** library using [Composer](https://getcomposer.org/ "Composer"):

```
composer require coderavine/sparta

```

\#Usage Sparta validation can be used in two different ways. Below are various examples that explain both:

- You can simply use a validator class to validate a certain type of data. For example, if you have a date and you want to ensure that only a date and nothing else is provided by end users, then you can do something as follows:

```
