PHP code example of wojciechmruk / iso8610datevalidator

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

    

wojciechmruk / iso8610datevalidator example snippets


Validator::extend('iso_date', 'WojciechMruk\LaravelValidator\Iso8610DateValidator@validate');
Validator::extend('date_not_before', 'WojciechMruk\LaravelValidator\DateRangeValidator@notFromThePast');
Validator::extend('date_before', 'WojciechMruk\LaravelValidator\DateRangeValidator@fromThePast');
Validator::extend('date_not_after', 'WojciechMruk\LaravelValidator\DateRangeValidator@notFromTheFuture');
Validator::extend('date_after', 'WojciechMruk\LaravelValidator\DateRangeValidator@fromTheFuture');

    'date_iso'              => 'Provided date should be in ISO 8601 format.',
    'date_not_before'       => 'Provided date can not be the past date.',
    'date_before'           => 'Provided date must be the past date.',
    'date_not_after'        => 'Provided date can not be the future date.',
    'date_after'            => 'Provided date must be the future date.',


 $this->validate($request, [
        'date' => '

 $this->validate($request, [
        'date' => '

 $this->validate($request, [
        'date' => '

 $this->validate($request, [
        'date' => '

 $this->validate($request, [
        'date' => '