@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 930 B
Markdown
---
lang: en
title: 'API docs: context.bindingkey.validate'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.bindingkey.validate.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [BindingKey](./context.bindingkey.md) > [validate](./context.bindingkey.validate.md)
## BindingKey.validate() method
Validate the binding key format. Please note that `#` is reserved. Returns a string representation of the binding key.
<b>Signature:</b>
```typescript
static validate<T>(key: BindingAddress<T>): string;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| key | <code>BindingAddress<T></code> | Binding key, such as <code>a</code>, <code>a.b</code>, <code>a:b</code>, or <code>a/b</code> |
<b>Returns:</b>
`string`