PHP code example of coolrist / role-based-email-validator

1. Go to this page and download the library: Download coolrist/role-based-email-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/ */

    

coolrist / role-based-email-validator example snippets


return [
    'only_custom' => false, // Leave false to use the built-in list + your custom list
    'list' => [
        // Add your own role-based email prefixes here
        'compta',
        'direction',
        // Common ones like 'admin', 'support' are already covered internally
    ],
];

Validator::make($request->all(), [
    'email' => '

'email' => '