Module: core/base-service/categories

Helpers for validating service category identifiers.

Source:

Members

(inner, constant) isValidCategory :Joi

Joi validator for service categories registered by Shields, including the special debug, dynamic, and static categories.

Type:
  • Joi
Source:

Methods

(inner) assertValidCategory(category, messageopt) → {void}

Assert that a value is a valid Shields service category.

Parameters:
Name Type Attributes Description
category string

Service category identifier to validate.

message string <optional>

Optional prefix for the validation error.

Source:
Throws:

When the category is not recognized.

Type
Error
Returns:
Type
void