The pattern [0-9] allows you to enter only a single digit. Perhaps you need to enter a few digits? In this case, you should use the template [0-9]+ . Modifier + means "one or more."
<f:validateRegex pattern="[0-9]+" />
If you allow empty input, use the * modifier instead, which means "zero or more."
<f:validateRegex pattern="[0-9]*" />
See also:
source share