isrc

Creates an ISRC validation action.

const Action = v.isrc<TInput, TMessage>(message);

Generics

Parameters

  • message TMessage

Explanation

With isrc you can validate the formatting of a string. If the input is not an ISRC, you can use message to customize the error message.

This action supports both compact (CCXXXYYNNNNN) and hyphenated (CC-XXX-YY-NNNNN) formats.

Returns

Examples

The following examples show how isrc can be used.

ISRC schema

Schema to validate an ISRC.

const IsrcSchema = v.pipe(v.string(), v.isrc('The ISRC is badly formatted.'));

// Valid ISRC formats:
// 'USRC17607839'
// 'US-RC1-76-07839'

The following APIs can be combined with isrc.

Schemas

Methods

Utils

Contributors

Thanks to all the contributors who helped make this page better!

  • GitHub profile picture of @fabian-hiller

Partners

Thanks to our partners who support the project ideally and financially.

Sponsors

Thanks to our GitHub sponsors who support the project financially.

  • GitHub profile picture of @antfu
  • GitHub profile picture of @UpwayShop
  • GitHub profile picture of @vasilii-kovalev
  • GitHub profile picture of @saturnonearth
  • GitHub profile picture of @ruiaraujo012
  • GitHub profile picture of @hyunbinseo
  • GitHub profile picture of @nickytonline
  • GitHub profile picture of @KubaJastrz
  • GitHub profile picture of @kibertoad
  • GitHub profile picture of @Thanaen
  • GitHub profile picture of @caegdeveloper
  • GitHub profile picture of @bmoyroud
  • GitHub profile picture of @dslatkin