PHP code example of onexcrm / valiper

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

    

onexcrm / valiper example snippets


Onex\Valiper\OnexValiperServiceProvider::class,

'OnexValiper'=> Onex\Valiper\Valiper\ValiperClassFacade::class,

/**
 * @param  array $formData
 * @param  array $rules
 * @param  array $messages
 * @return void
 */
$validator = OnexValiper::checkInputValidation($formRequestData, $validationRules, $validationMessages);
dd($validator);

$result = OnexValiper::inputValidationObjectFormat($validator);
dd($result);

$result = OnexValiper::inputValidationArrayFormat($validator);
dd($result);

$result = OnexValiper::inputValidationJsonResponseFormat($validator);
dd($result);

$result = OnexValiper::inputValidationJsonFormat($validator);
dd($result);

$result = OnexValiper::inputValidationJsonObjectFormat($validator);
dd($result);

$result = OnexValiper::inputValidationKeyValuePairFormat($validator);
dd($result);

$result = OnexValiper::inputValidationFirstMessage($validator);
dd($result);