Skip to content

Commit e2bdf71

Browse files
test
1 parent 7075819 commit e2bdf71

12 files changed

+1136
-0
lines changed

tests/test.php

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
require 'vendor/autoload.php';
4+
5+
use Shoyim\PhpValidation\Validator;
6+
7+
$params = [
8+
'username' => 'shoyimobloqulov',
9+
'email' => '[email protected]',
10+
'password' => '123'
11+
];
12+
13+
$validateRules = [
14+
'email' => 'required|email',
15+
'username' => 'required|string|min:5|max:10',
16+
'password' => 'required|password'
17+
];
18+
19+
$validator = new Validator();
20+
$validator->validate($validateRules, $params);
21+
22+
var_dump($validator->fails());
23+
var_dump($validator->getErrors());

vendor/autoload.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
// autoload.php @generated by Composer
4+
5+
if (PHP_VERSION_ID < 50600) {
6+
if (!headers_sent()) {
7+
header('HTTP/1.1 500 Internal Server Error');
8+
}
9+
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
10+
if (!ini_get('display_errors')) {
11+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12+
fwrite(STDERR, $err);
13+
} elseif (!headers_sent()) {
14+
echo $err;
15+
}
16+
}
17+
trigger_error(
18+
$err,
19+
E_USER_ERROR
20+
);
21+
}
22+
23+
require_once __DIR__ . '/composer/autoload_real.php';
24+
25+
return ComposerAutoloaderInit29fc62bf20e7ab839a22e90b226602d4::getLoader();

0 commit comments

Comments
 (0)