Socket
Book a DemoInstallSign in
Socket

@finnair/v-validation-moment

Package Overview
Dependencies
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@finnair/v-validation-moment

Moment validators

latest
Source
npmnpm
Version
10.0.0
Version published
Weekly downloads
364
0.55%
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

validation

FAQs

Package last updated on 15 Sep 2025

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