UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

65 lines (34 loc) 1.21 kB
--- lang: en title: 'API docs: context.bindingkey.validate' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context permalink: /doc/en/lb4/apidocs.context.bindingkey.validate.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [BindingKey](./context.bindingkey.md) &gt; [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. **Signature:** ```typescript static validate<T>(key: BindingAddress<T>): string; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> key </td><td markdown="1"> [BindingAddress](./context.bindingaddress.md)<!-- -->&lt;T&gt; </td><td markdown="1"> Binding key, such as `a`<!-- -->, `a.b`<!-- -->, `a:b`<!-- -->, or `a/b` </td></tr> </tbody></table> **Returns:** string