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

@finnair/v-validation-luxon

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@finnair/v-validation-luxon

Luxon validators

  • 1.1.0-alpha.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
228
decreased by-62.44%
Maintainers
4
Weekly downloads
 
Created
Source

npm version

v-validation-luxon

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

Vluxon extension uses custom wrapper types for Luxon DateTime to support full JSON roundtrip with strict validation.

Documentation for v-validation.

Getting Started

Install v-validation using yarn:

yarn add @finnair/v-validation-luxon

Or npm:

npm install @finnair/v-validation-luxon

Vluxon

validateLuxon functions can be used to build custom DateTime validators/converters by supplying a RegExp pattern and a wrapper class (subclass of LuxonDateTime). The wrapper class should guarantee proper toJSON() and other required properties for the type (e.g. timezone handling).

Time zone 00:00 is serialized as Z.

Vluxon .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.SSSZDate and time with millis in local (parsed) time zone.
dateTimeMillisUtcYYYY-MM-DDTHH:mm:ss.SSSZDate and time with millis in UTC time zone.
timeHH:mm:ssLocal time.
durationISO 8601 DurationLuxon Duration with pattern validation.

Keywords

FAQs

Package last updated on 12 Aug 2022

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