33slona/nvstr-validation

There is no license information available for the latest version (v1.2.3) of this package.

Валидатор данных

v1.2.3 2018-04-19 15:29 UTC

README

List of available schemas

  • "slon" - full slon format schema
  • "slon/schema" - full slon format schema
  • "slon/developer" - developer schema
  • "slon/complex" - complex schema
  • "slon/corp" - corp schema
  • "slon/layout" - layout schema
  • "slon/flat" - flat schema
PHP install
composer require 33slona/nvstr-validation

PHP usage

    $data = []; // Some Data
    $schema = "slon";
    
    $validator = new SourceValidator($data, $schema);
    if (!$validator->validate()) {
        print_r($validator->getErrors());
    }
Python install
pip3 install git+https://public.git.33slona.ru/33slona.ru/parsers-validator.git

Python usage

    from pyvalidator import Validator
    
    validator = Validator(data=data, schema="slon")
    if not validator.validate():
        print(validator.errors)