Welcome Guest, Not a member yet? Register   Sign In
valid_date not working as expected

I'm trying to validate this date: 14/04/2021 16:00, so inside the validation rules of the controller I did:

PHP Code:
        $validationRules = [
            'title'             => 'required|min_length[1]|max_length[60]',
            'author_id'         => 'required|integer',
            'status'            => 'required|in_list[draft,published]',
            'published_date'    => 'required|valid_date[d/m/Y H:m"]'

the problem's that when the code reach this line:

PHP Code:
if (!$this->validate($validationRules)) {
      var_dump(date("d/m/Y H:m"));
      return redirect()->back()->withInput()->with('error'$this->validator->getErrors());

The field published_date must contains a valid date

Messages In This Thread
valid_date not working as expected - by sfarzoso - 04-14-2021, 08:01 AM

Theme © iAndrew 2016 - Forum software by © MyBB