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

Built-in Date Validation Rule Broken #157

Closed
Gooseus opened this issue Oct 11, 2011 · 2 comments
Closed

Built-in Date Validation Rule Broken #157

Gooseus opened this issue Oct 11, 2011 · 2 comments

Comments

@Gooseus
Copy link

Gooseus commented Oct 11, 2011

It seems like the date validation that is built in to the Validator utility is no longer passing for valid date strings. Here is a test case I wrote which fails:

http://pastium.org/view/0403d3e4f560e3f790b32053c7d6ed3c

@nateabele
Copy link
Member

You forgot to specify the format:

        $validates = array(
            'myDate' => array(
                array('date', 'message' => 'failed test', 'format' => 'ymd')
            )
        );

@Gooseus
Copy link
Author

Gooseus commented Oct 13, 2011

I was under the impression that you could have a date input that followed multiple date formats by not specifying one. I don't believe I had specified a format in the passed and it would validate for multiple format types

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

2 participants