PHP code example of qtlenh / laravel-strict-validator

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

    

qtlenh / laravel-strict-validator example snippets


$request->validate([
  'width' => 'integer:strict', // return error if `width` is string type
  'height' => 'integer:cast', // cast `height` to integer type if it is valid
]);