Skip to main content
cngx-src documentation

ConstraintHintFormatters

Interface

projects/forms/field/form-field.token.ts

Import#

import { ConstraintHintFormatters } from '@cngx/forms/field'

Description#

Complete set of formatter functions for constraint hint text. Stored in config after withConstraintHints() merges user overrides with defaults.

Index#

Instance Properties#

Additional hints from custom constraints. Receives constraint metadata and returns extra hint strings to append.

Pattern hint

extra: (c) => c.patterns.length ? ['Must match the required format'] : []

Required hint

extra: (c) => c.required ? ['This field is mandatory'] : []
lengthRange#function

Format "8–64 characters".

maxLength#function

Format "Max. 64 characters".

maxValue#function

Format "Max. 100".

minLength#function

Format "Min. 8 characters".

minValue#function

Format "Min. 0".

valueRange#function

Format "0–100".