A2uiLengthFunction


public final class A2uiLengthFunction implements A2uiFunction


Validates string length limits.

Use this A2uiFunction to check minimum and maximum length bounds.

Summary

Public fields

static final @NonNull A2uiLengthFunction

Public methods

Object
execute(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull A2uiExecutionContext executionContext
)

Validates that the string length in args meets the required bounds.

@NonNull A2uiFunctionDefinition

The definition of the function.

Public fields

INSTANCE

public static final @NonNull A2uiLengthFunction INSTANCE

Public methods

execute

public Object execute(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull A2uiExecutionContext executionContext
)

Validates that the string length in args meets the required bounds.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

arguments containing "value" string and optional "min" or "max" limits

@NonNull A2uiExecutionContext executionContext

context allowing to execute other functions, evaluate dynamic payloads and resolving data bindings

Returns
Object

true if the string length is within bounds, false otherwise

getDefinition

public @NonNull A2uiFunctionDefinition getDefinition()

The definition of the function.