PHPackages                             svenkuegler/php-csv-validator - 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. svenkuegler/php-csv-validator

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

svenkuegler/php-csv-validator
=============================

Simple PHP Class to validate CSV files / Single Rows

0.1.0(10y ago)29.8k↑57.1%1MITPHPPHP &gt;=5.3.0

Since Mar 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/svenkuegler/php-csv-validator)[ Packagist](https://packagist.org/packages/svenkuegler/php-csv-validator)[ Docs](https://github.com/svenkuegler/php-csv-validator)[ RSS](/packages/svenkuegler-php-csv-validator/feed)WikiDiscussions master Synced 2d ago

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

PHP CSV Validator
=================

[](#php-csv-validator)

[![Build Status](https://camo.githubusercontent.com/24ea5ff2680cf6e2ac956bfd8d6ecb49b9eb3b1b3cbc2f2de25cca664461fcc6/68747470733a2f2f7472617669732d63692e6f72672f7376656e6b7565676c65722f7068702d6373762d76616c696461746f722e737667)](https://travis-ci.org/svenkuegler/php-csv-validator)[![Code Climate](https://camo.githubusercontent.com/2c1520b652035138f2c9a94a544943c3081d93a80628d9a9e773712e04a71798/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7376656e6b7565676c65722f7068702d6373762d76616c696461746f722f6261646765732f6770612e737667)](https://codeclimate.com/github/svenkuegler/php-csv-validator)[![Test Coverage](https://camo.githubusercontent.com/ab9c8b5180183772ef2557b60f27097ba572d7b39f2ecfb3b5c26da86a348a4e/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7376656e6b7565676c65722f7068702d6373762d76616c696461746f722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/svenkuegler/php-csv-validator/coverage)

Simple PHP Class to Validate CSV Files

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

[](#installation)

via Composer:

```
composer require svenkuegler/php-csv-validator
```

Usage
-----

[](#usage)

### Quick Start

[](#quick-start)

Simple example to validate a file against a Schema.

```
require 'vendor/autoload.php';

$validator = new PhpCsvValidator();
$validator->loadSchemeFromFile("tests/files/example-scheme2.json");

if($validator->isValidFile("tests/files/example.csv")) {
    echo "File is Valid";
} else {
    echo "File is Invalid!";
}
```

### Schema

[](#schema)

...

### Exception handling

[](#exception-handling)

...

Running Tests
-------------

[](#running-tests)

```
$ phpunit
```

Contributing
------------

[](#contributing)

Feel free to send pull requests or create issues if you come across problems or have great ideas. Any input is appreciated!

License
-------

[](#license)

This code is published under the [The MIT License](https://github.com/svenkuegler/php-csv-validator/blob/HEAD/LICENSE). This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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

Unknown

Total

1

Last Release

3746d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/949708?v=4)[Sven Kuegler](/maintainers/svenkuegler)[@svenkuegler](https://github.com/svenkuegler)

---

Top Contributors

[![svenkuegler](https://avatars.githubusercontent.com/u/949708?v=4)](https://github.com/svenkuegler "svenkuegler (9 commits)")[![SL-Gundam](https://avatars.githubusercontent.com/u/912973?v=4)](https://github.com/SL-Gundam "SL-Gundam (1 commits)")

---

Tags

phpschema

### Embed Badge

![Health badge](/badges/svenkuegler-php-csv-validator/health.svg)

```
[![Health](https://phpackages.com/badges/svenkuegler-php-csv-validator/health.svg)](https://phpackages.com/packages/svenkuegler-php-csv-validator)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

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