PHP code example of rosamarsky / slim-validation
1. Go to this page and download the library: Download rosamarsky/slim-validation 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/ */
rosamarsky / slim-validation example snippets
$app->post('/users', function(Request $request, Response $response) use ($container) {
// ...
})->add(validator(
v::key('email' , v::notEmpty()->email()),
v::key('password', v::notEmpty()->length(8, null))
));