romannowicki / assure
This package is abandoned and no longer maintained.
No replacement package was suggested.
Data correction and validation
2.0.1
2015-05-03 16:35 UTC
Requires (Dev)
- phpunit/phpunit: 4.2.*
- satooshi/php-coveralls: dev-master
- scrutinizer/ocular: dev-master
This package is not auto-updated.
Last update: 2015-07-24 18:41:26 UTC
README
Data correction and validation tools
Installation
via Composer:
"require": { "romannowicki/assure": "2.0.1" }
Usage example
// if value is not integer and cannot be transform to integer assure with throw exception // correct values: '1', 1, 1.3 // invalid values: 'a', NULL, false, array() assure($value, 'integer'); // if not integer OR string with integers separated by commas assure will throw exception // correct values: '1', '1,2,3,4,5'; // invalid values: 'a', '1,2,a,4,b'; assure($value, ['integer', 'commaSeparatedIntegers']);