Socket
Socket
Sign inDemoInstall

@salesflare/joi-date-string

Package Overview
Dependencies
1
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @salesflare/joi-date-string

Date string validation rule for Joi


Version published
Maintainers
3
Created

Readme

Source

joi-date-string

Date string validation rule for Joi

Build Status Greenkeeper badge

What

Allows you to do Joi.dateString().

Uses moment for validation.

How

const myCustomJoi = Joi.extend(require('joi-date-string'));

myCustomJoi.dateString().validate('2018-10-05'); // pass

myCustomJoi.dateString().validate('05-10-2018'); // fail
myCustomJoi.dateString().validate(new Date()); // fail
myCustomJoi.dateString().validate('2018-08-02T12:09:04.378Z'); // fail
myCustomJoi.dateString().validate('1'); // fail
myCustomJoi.dateString().validate(1); // fail

Keywords

FAQs

Last updated on 01 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc