PHP code example of solophp / validator
1. Go to this page and download the library: Download solophp/validator 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/ */
solophp / validator example snippets
use Solo\Validator;
$validator = new Validator();
$validator
->validate('email', '[email protected]')
->ern('\+7[0-9]{10}');
if ($validator->failed()) {
$errors = $validator->getErrors();
}
$validator
->validate('email', '[email protected]')
->
$validator = new Validator([
't be valid email'
]);