1. Go to this page and download the library: Download werx/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/ */
php
namespace your\namespace\Rulesets;
use werx\Validation\Ruleset;
class Contact extends Ruleset
{
public function __construct()
{
$this->addRule('firstname', 'First Name', '
}
php
$contact_rules = new your\namespace\Rulesets\Contact;
$validator->addRuleset($contact_rules);
$valid = $validator->validate();