Input

Exact Length

Rule `exact_length`: String must have exact length.

Usage

Use for fixed-length identifiers.

$schema = \Lemonade\Framework\Validation\ValidationSchema::create()
    ->field('field', 'Field')
        ->exactLength(8)
        ->end();

$result = $validator->validate($payload, $schema);

Stable rule name

exact_length for translations, registry lookup and per-rule messages.

Group

String Length