PHP code example of saxulum / saxulum-validator-provider

1. Go to this page and download the library: Download saxulum/saxulum-validator-provider library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

saxulum / saxulum-validator-provider example snippets

 {.php}
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
 {.php}
$container['validator.loader.xml.files'] = $container->extend('validator.loader.xml.files', function ($files) {
    $files[] = __DIR__ . '/../../Fixtures/test.xml';
    return $files;
});
 {.php}
$container['validator.loader.yaml.files'] = $container->extend('validator.loader.yaml.files', function ($files) {
    $files[] = __DIR__ . '/../../Fixtures/test.yaml';
    return $files;
});
 {.php}
$container['validator']->validate($object);