Yup

node v6.17.1
version: 1.0.0
endpointsharetweet
const { object, date } = require('yup') const schema = object({ not_required: date().nullable(), required: date().required(), }) let dates = { not_required: '', required: '', } await schema.validate(dates)
Or validate an object you already have:
Or if you want to do both at the same time:
Loading…

no comments

    sign in to comment