Semantic-Org/Semantic-UI · warning
{name} must be at least {ruleValue} characters
Error message
{name} must be at least {ruleValue} characters What it means
Default prompt for the Semantic UI Form `minLength` rule (settings.rules.minLength, form.js:1486). Shown when `value.length < requiredLength` (the `{ruleValue}`). Guarded against undefined value (returns false).
Source
Thrown at src/definitions/behaviors/form.js:1270
prompt: {
empty : '{name} must have a value',
checked : '{name} must be checked',
email : '{name} must be a valid e-mail',
url : '{name} must be a valid url',
regExp : '{name} is not formatted correctly',
integer : '{name} must be an integer',
decimal : '{name} must be a decimal number',
number : '{name} must be set to a number',
is : '{name} must be "{ruleValue}"',
isExactly : '{name} must be exactly "{ruleValue}"',
not : '{name} cannot be set to "{ruleValue}"',
notExactly : '{name} cannot be set to exactly "{ruleValue}"',
contain : '{name} must contain "{ruleValue}"',
containExactly : '{name} must contain exactly "{ruleValue}"',
doesntContain : '{name} cannot contain "{ruleValue}"',
doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"',
minLength : '{name} must be at least {ruleValue} characters',
length : '{name} must be at least {ruleValue} characters',
exactLength : '{name} must be exactly {ruleValue} characters',
maxLength : '{name} cannot be longer than {ruleValue} characters',
match : '{name} must match {ruleValue} field',
different : '{name} must have a different value than {ruleValue} field',
creditCard : '{name} must be a valid credit card number',
minCount : '{name} must have at least {ruleValue} choices',
exactCount : '{name} must have exactly {ruleValue} choices',
maxCount : '{name} must have {ruleValue} or less choices'
},
selector : {
checkbox : 'input[type="checkbox"], input[type="radio"]',
clear : '.clear',
field : 'input, textarea, select',
group : '.field',
input : 'input',
message : '.error.message',View on GitHub (pinned to 597843ab84)
Solutions
- Enter at least the required number of characters.
- Confirm the bracket value is the intended minimum (not the maximum).
- For multibyte safety, note `value.length` counts UTF-16 code units.
- Add a custom `prompt`.
Example fix
// before
rules: [{ type: 'minLength[8]' }] // 'abc' -> 'must be at least 8 characters'
// after
rules: [{ type: 'minLength[8]', prompt: 'Use at least 8 characters' }] Defensive patterns
Strategy: validation
Validate before calling
const min = 8;
if (($field.val() || '').length < min) { /* warn */ } Type guard
const meetsMinLength = (v, min) => String(v).length >= min;
Prevention
- Show a live character counter.
- Use exactLength when a fixed length is required.
- Remember length counts UTF-16 code units for multibyte input.
When it happens
Trigger: `{type:'minLength[8]'}` with input `abc` (3 < 8). Empty/short paste, or counting characters where the user counted bytes/words.
Common situations: Password minimum length, username minimums, multibyte characters counted differently than expected.
Related errors
- {name} must be exactly {ruleValue} characters
- {name} cannot be longer than {ruleValue} characters
- {name} must be a valid url
- {name} is not formatted correctly
- {name} must be an integer
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/f7a732ac71fe3fd7.
Report an issue: GitHub.