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

presence validator against date attribute will complain even it's not empty #48

Closed
yunjia opened this issue Apr 15, 2015 · 2 comments
Closed

Comments

@yunjia
Copy link

@yunjia yunjia commented Apr 15, 2015

Following is a quick test case:

var validate = require("validate.js");

describe("validate", function ()
{
    describe("should give correct error for presence validator", function ()
    {
        it("when validating against date", function ()
        {
            var obj = {date: new Date()}, constrain = {date: {presence: true}};

            expect(validate(obj, constrain)).toBe(undefined);
        });
    });
});
@yunjia yunjia changed the title presence validator agains date attribute will complain even there is a date presence validator against date attribute will complain even it's not empty Apr 15, 2015
@ansman
Copy link
Owner

@ansman ansman commented Apr 16, 2015

Nice find! I'll release a patch today.

Loading

@ansman
Copy link
Owner

@ansman ansman commented Apr 16, 2015

Fixed in 0.7.1

Loading

@ansman ansman closed this Apr 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants