PHP code example of cakephp / validation
1. Go to this page and download the library: Download cakephp/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/ */
cakephp / validation example snippets
use Cake\Validation\Validator;
$validator = new Validator();
$validator
->e' => 'E-mail must be valid'
])
-> need to give a comment.');
$errors = $validator->validate($_POST);
if (!empty($errors)) {
// display errors.
}