---
title: bic
description: Creates a BIC validation action.
source: /actions/bic/bic.ts
contributors:
  - fabian-hiller
  - ariskemper
---

import { ApiList, Property } from '~/components';
import { properties } from './properties';

# bic

Creates a [BIC](https://en.wikipedia.org/wiki/ISO_9362) validation action.

```ts
const Action = v.bic<TInput, TMessage>(message);
```

## Generics

- `TInput` <Property {...properties.TInput} />
- `TMessage` <Property {...properties.TMessage} />

## Parameters

- `message` <Property {...properties.message} />

### Explanation

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

## Returns

- `Action` <Property {...properties.Action} />

## Examples

The following examples show how `bic` can be used.

### BIC schema

Schema to validate a BIC.

```ts
const BicSchema = v.pipe(
  v.string(),
  v.toUpperCase(),
  v.bic('The BIC is badly formatted.')
);
```

## Related

The following APIs can be combined with `bic`.

### Schemas

<ApiList items={['any', 'custom', 'string']} />

### Methods

<ApiList items={['pipe']} />

### Utils

<ApiList items={['isOfKind', 'isOfType']} />
