PHP code example of shergela / validation-rule

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

    

shergela / validation-rule example snippets



return [
    Shergela\Validations\ShergelaValidationsServiceProvider
];


namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Shergela\Validations\Validation\Rule;

class TestRequest extends FormRequest
{
/**
* @return bool
*/
public function authorize(): bool
{
    return true;
}

    public function rules(): array
    {
        return [
            'name' => [
                Rule::

    
    namespace App\Http\Requests;
    
    use Illuminate\Foundation\Http\FormRequest;
    use Shergela\Validations\Validation\Rule;
    
    class TestRequest extends FormRequest
    {
        /**
        * @return bool
          */
          public function authorize(): bool
          {
          return true;
          }
        
          public function rules(): array
          {
            return [
                'name' => Rule::