Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@finnair/v-validation-moment

Package Overview
Dependencies
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@finnair/v-validation-moment

Moment validators

  • 4.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
184
decreased by-30.04%
Maintainers
4
Weekly downloads
 
Created
Source

npm version

v-validation-moment

@finnair/v-validation-moment is an extension to @finnair/v-validation.

Vmoment extension uses custom Moment extensions to support full JSON roundtrip with strict validation.

Documentation for v-validation.

Getting Started

Install v-validation using yarn:

yarn add @finnair/v-validation-moment

Or npm:

npm install @finnair/v-validation-moment

Vmoment

MomentValidator can be used to build custom Moment validators/converters by supplying a parse function. However, Moment instances always serialize to JSON in full date-time format. V supports Moment extensions that requires an exact input format and also serialize to JSON using that same format.

Time zone 00:00 is serialized as Z.

Vmoment.FormatDescription
dateYYYY-MM-DDLocal date.
dateUtcYYYY-MM-DDDate in UTC time zone.
dateTimeYYYY-MM-DDTHH:mm:ssZDate and time in local (parsed) time zone.
dateTimeUtcYYYY-MM-DDTHH:mm:ssZDate and time in UTC time zone.
dateTimeMillisYYYY-MM-DDTHH:mm:ss.SSSZ Date and time with millis in local (parsed) time zone.
dateTimeMillisUtcYYYY-MM-DDTHH:mm:ss.SSSZ Date and time with millis in UTC time zone.
timeHH:mm:ssLocal time.
durationISO 8601 Durationmoment.duration with pattern validation.

Keywords

FAQs

Package last updated on 03 Oct 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc