6.1.0 • Published 9 months ago

@finnair/v-validation-moment v6.1.0

Weekly downloads
678
License
MIT
Repository
github
Last release
9 months ago

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.
6.1.0

9 months ago

6.0.1

10 months ago

6.0.0

10 months ago

6.0.2

10 months ago

5.4.0

1 year ago

5.3.0

1 year ago

5.2.0

1 year ago

5.1.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.3.0

2 years ago

3.1.0

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.0.0-alpha.1

3 years ago

3.0.0-alpha.0

3 years ago

3.0.0-alpha.2

3 years ago

2.0.0

3 years ago

3.0.0

3 years ago

1.1.0

3 years ago

1.1.0-alpha.0

3 years ago

1.1.0-alpha.5

3 years ago

1.1.0-alpha.6

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.0

5 years ago