ballerina/constraint : 1.0.0

Overview

This module provides features to validate the values that have been assigned to Ballerina types.

The Ballerina constraint module facilitates APIs to do validations on the Ballerina types further with the use of annotations.

Functions

[1]

validate

Validates the provided value against the configured annotations.

Records

[5]

ArrayConstraints

Represents the constraints associated with anydata[] type.

FloatConstraints

Represents the constraints associated with float type.

IntConstraints

Represents the constraints associated with int type.

NumberConstraints

Represents the constraints associated with int, float and decimal types.

StringConstraints

Represents the constraints associated with string type.

Annotations

[5]

Array

The annotation, which is used for the constraints of the anydata[] type.

Float

The annotation, which is used for the constraints of the float type.

Int

The annotation, which is used for the constraints of the int type.

Number

The annotation, which is used for the constraints of the int, float, and decimal types.

String

The annotation, which is used for the constraints of the string type.

Errors

[1]

Error

Represents the error type of the module.