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

date().iso() is wrongly claiming input is invalid #73

Open
pke opened this issue Oct 10, 2018 · 0 comments
Open

date().iso() is wrongly claiming input is invalid #73

pke opened this issue Oct 10, 2018 · 0 comments

Comments

@pke
Copy link
Contributor

pke commented Oct 10, 2018

Using

validate: {
  type: "form",
  body: {
    start: Joi.date().iso().greater("now"),
  }
}

The form input of start="2018-10-10T10:00" or start="2018-10-10T10:00Z" both lead to

child "start" fails because ["start" must be a valid ISO 8601 date]

However Joi.validate("2018-10-10T10:00", Joi.date().iso().greater("now")) => error === null

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

1 participant