Skip to content

How to reference a schema ? #14

@AkshitKhajuria

Description

@AkshitKhajuria

Suppose I have a two dates - fromDate and toDate and I don't want the toDate to be before fromDate. In joi I would refer fromDate as follows -

  • fromDate: Joi.date().iso().required(),
  • toDate : Joi.date().iso().greater(Joi.ref('startTime')).required()

How can I do the same in joi-json ??

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