Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Validator

Provides a collection of validation methods used to check whether a roomID or attribute name is legally formed.

Hierarchy

  • Validator

Index

Methods

Static isValidAttributeName

  • isValidAttributeName(value?: undefined | string): boolean
  • Returns true if the specified attribute name is legally formed. An attribute name is invalid if:

    • it contains Tokens.RS
    • it is null or the empty string

    Parameters

    • Optional value: undefined | string

    Returns boolean

Static isValidAttributeScope

  • isValidAttributeScope(value?: undefined | string): boolean
  • Returns true if the specified client-attribute scope is legally formed. A client attribute scope is invalid if:

    • it is not null, and it is not a valid resolved room ID (null is valid: it refers to the global scope)

    Parameters

    • Optional value: undefined | string

    Returns boolean

Static isValidAttributeValue

  • isValidAttributeValue(value: string): boolean
  • Returns true if the specified attribute value is legally formed. An attribute value is invalid if:

    • it contains Tokens.RS

    Parameters

    • value: string

    Returns boolean

Static isValidModuleName

  • isValidModuleName(value: string): boolean
  • Returns true if the specified room module name is legally formed. A room module name is invalid if:

    • it contains Tokens.RS
    • it is the empty string

    Parameters

    • value: string

    Returns boolean

Static isValidPassword

  • isValidPassword(value: string): boolean
  • Returns true if the specified password is legally formed. A password is invalid if:

    Parameters

    • value: string

    Returns boolean

Static isValidResolvedRoomID

  • isValidResolvedRoomID(value: string): boolean
  • Returns true if the specified value could legally be resolved to a single, specific room; false otherwise.

    The supplied value is invalid if:

    • it is null
    • it is the empty string
    • it contains Tokens.RS
    • it contains Tokens.WILDCARD (because the wildcard refers to a group of rooms with the same qualifier, not a single, specific room)

    Parameters

    • value: string

    Returns boolean

Static isValidRoomID

  • isValidRoomID(value: string): boolean
  • Returns true if the specified room ID (with no qualifier) is legally formed; false otherwise. An unqualified room ID is invalid if:

    Parameters

    • value: string

    Returns boolean

Static isValidRoomQualifier

  • isValidRoomQualifier(value: string): boolean
  • Returns true if the specified room qualifier is legally formed; false otherwise. A room qualifier is invalid if:

    Parameters

    • value: string

    Returns boolean