PHP code example of fusic / apollon

1. Go to this page and download the library: Download fusic/apollon 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/ */

    

fusic / apollon example snippets


private function setValidationProvider(Validator $validator)
    {
       $validator->setProvider('apollon', 'Apollon\Validation\ApollonValidation');
       return $validator;
    }

public function validationDefault(Validator $validator)
    {
        $this->setValidationProvider($validator);
        $validator
            ->scalar('password')
            ->            'provider' => 'apollon',
                'message' => 'パスワードは半角英数記号で入力してください'
            ]);
    }