Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

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

@yunjia

Description

@yunjia

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);
        });
    });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions