Skip to content

@serenity-is/corelib / ClientValidationRule

Interface: ClientValidationRule

Defined in: src/base/propertyitem.ts:56

A validation rule of a field as the server sends it, from a validation attribute of its property, e.g. ValidateRange, which is checked by the rule of the same name registered with registerValidationRule.

Properties

message?

optional message: string

Defined in: src/base/propertyitem.ts:64

The message as it is, used when there is no text of the key. The default message of the rule is used without both.


params?

optional params: any

Defined in: src/base/propertyitem.ts:60

The parameters of the rule, e.g. [1, 10] for a range.


rule

rule: string

Defined in: src/base/propertyitem.ts:58

The name of the rule, e.g. range.


textKey?

optional textKey: string

Defined in: src/base/propertyitem.ts:62

The local text key of the message, used when it has a text.