Skip to content

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

@pke

Description

@pke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions