1. Go to this page and download the library: Download unicframework/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/ */
unicframework / validator example snippets
use Validator\Validator;
// Set data validation rules
$validator = Validator::make([
'first_name' => [
' true,
'string' => true
],
'email' => [
'> [
'
use Validator\Validator;
// Set data validation rules
$validator = Validator::make([
'first_name,last_name' => 'd|not_null|minlength:6'
]);
use Validator\Validator;
// Set validation error messages
$validator = Validator::make([
'first_name' => [
'e,
'string' => true
],
'email' => [
'> [
'tring' => 'First name should be in string'
],
'last_name' => [
's'
],
'gender' => [
'
use Validator\Validator;
// Set validation error messages
$validator = Validator::make([
'first_name,last_name' => 't_null|minlength:6'
],
[
'first_name,last_name' => 'can not be null|in:Please select valid gender',
'password' => '