ksuid

Creates a KSUID validation action.

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

Generics

Parameters

  • message TMessage

Explanation

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

Returns

Examples

The following examples show how ksuid can be used.

KSUID schema

Schema to validate a KSUID.

const KsuidSchema = v.pipe(
  v.string(),
  v.ksuid('The KSUID is badly formatted.')
);

The following APIs can be combined with ksuid.

Schemas

Methods

Utils

Contributors

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

  • GitHub profile picture of @idleberg

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 @vasilii-kovalev
  • GitHub profile picture of @UpwayShop
  • GitHub profile picture of @ruiaraujo012
  • GitHub profile picture of @hyunbinseo
  • GitHub profile picture of @nickytonline
  • GitHub profile picture of @kibertoad
  • GitHub profile picture of @caegdeveloper
  • GitHub profile picture of @Thanaen
  • GitHub profile picture of @bmoyroud
  • GitHub profile picture of @ysknsid25
  • GitHub profile picture of @dslatkin