PHP code example of vdhicts / laravel-validation-rules

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

    

vdhicts / laravel-validation-rules example snippets


'field' => [new \BicNumber()],

'field' => [new Contains($needle)],

'field' => [new ContainsAny(['foo', 'bar'])],

'field' => [new DateAfterOrEqual($date)],

'field' => [new DateBeforeOrEqual($date)],

'field' => [new DateHasSpecificMinutes([0, 15, 30, 45])],

'field' => [new DateHasSpecificMinutes([0, 15, 30, 45], 'd-m-Y H:i')],

'field' => [new DutchPhone()],

'field' => [new DutchPostalCode()],

'field' => [new HostName()],

'field' => [new InternationalBankAccountNumber()],

'field' => [new Interval()],

'field' => [new MaximumHourDifference($start, 10)];

'field' => [new MimeType()],

'field' => [new NotContains($needle)],

'field' => [new Phone()],

'field' => [new PositiveInterval()],

'field' => [new Price()], // accepts both , and .
'field' => [new Price(',')], // accepts only ,

'field' => [new SecureUrl()],

'field' => [new Semver()],

'field' => [new VatNumber()],