Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule validator wont pass #16828

Closed
oriceon opened this issue Dec 16, 2016 · 9 comments
Closed

Rule validator wont pass #16828

oriceon opened this issue Dec 16, 2016 · 9 comments

Comments

@oriceon
Copy link
Contributor

oriceon commented Dec 16, 2016

  • Laravel Version: 5.3.28
  • PHP Version: 7.0.12

Description:

Validator rule date_format:H:i wont pass.

@GrahamCampbell
Copy link
Member

Please provide more information.

@oriceon
Copy link
Contributor Author

oriceon commented Dec 16, 2016

@GrahamCampbell i send an input with value 8:00 and trying to validate using rule date_format:H:i and now with last version wont pass validator. With oldest 5.3 works at is should.

@GrahamCampbell
Copy link
Member

Please can you find the version it broke in?

@oriceon
Copy link
Contributor Author

oriceon commented Dec 16, 2016

@GrahamCampbell I tested it and it is about laravel 5.3.27. I think it is about pull #16692

@themsaid
Copy link
Member

themsaid commented Dec 16, 2016

This seems to work:

    Validator::make(
    [
        "time" => '06:23'
    ],
    [
        'time' => 'date_format:H:i'
    ])

Please share the broken case.

@oriceon
Copy link
Contributor Author

oriceon commented Dec 16, 2016

@themsaid Thanks for your comment. If you cut the 0 from time, validator wont pass: 6:23

@themsaid
Copy link
Member

9:00 should fail for H:i yes, it's expected.

@oriceon
Copy link
Contributor Author

oriceon commented Dec 16, 2016

Ya, maibe i'll try G:i :)

@themsaid
Copy link
Member

Yup http://php.net/manual/en/function.date.php :)

@oriceon oriceon closed this as completed Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants