ISO8601 Date validator for Laravel 5
Written by Bastien Donjon, Posted in PHP
date_format rule for Laravel 5 Validator don’t work.
So here is a validation rule for Laravel :
<?php
// file : app/Provider/AppServiceProvider.php
namespace App\Providers;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// Validation
Validator::extend(
'iso_date',
function ($attribute, $value, $parameters, $validator) {
$regex = '/^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|' .
'(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]' .
'\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)' .
'-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:Z|[+-][01]\d:[0-5]\d)$/';
return preg_match_all($regex, $value) > 0;
}
);
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
1qvQZlI57Zx
KKDQXJmopAQ
Alright, 188be, not bad. Been using it a while, a trustworthy option. You can trust this one 188be!
Okay, so Diuwincolourtrading is something I stumbled upon. Colour trading? Sounds interesting. I’d probably proceed with caution and do your research, but hey, maybe it’s your thing. Learn more: diuwincolourtrading
Interesting article! Thinking about player psychology is key to success, especially in games like poker. Tools to analyze your style, like those at faker mbti online casino, could really elevate your game. Definitely worth exploring for serious players!
Interesting analysis! Seeing a lot of parallels between traditional games & modern online platforms like 888Jili – that “888” symbolism is powerful! For easy access, check out 888jili login download apk – a seamless entry to that digital fortune!
Alright, check out pgbetcasino! It’s got a decent setup. User friendly interface and reliable payouts. Its worth a try if you enjoy slot games. pgbetcasino
Yo, Vay88app is legit! I’ve been on Vay88app for a while now and I’m really digging it. It’s got a decent selection and the interface is pretty slick. Check out vay88app if you’re looking for something new.
Play789Club is kinda cool. Need more time with Play789Club to fully rate. Worth a look though play789club.
Categories
Recent Posts
Mes sites
Archives