PHP code example of isev-ltd / contact-form-validation

1. Go to this page and download the library: Download isev-ltd/contact-form-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/ */

    

isev-ltd / contact-form-validation example snippets




return [
    'validate' => [
        'fromName' => 'oneNumber' => ' => 'trim',
        'fromEmail' => 'trim|sanitize_email',
        'phoneNumber' => 'trim',
        'body' => 'trim',
    ],
    'readableNames' => [
        'phoneNumber' => 'phone number',
        'fromEmail' => 'email',
        'fromName' => 'name',
        'body' => 'enquiry',
    ]
];
config/contact-form-validation.php