KeyFilter is a directive to restrict individual key strokes. In order to restrict the whole input, use InputNumber or InputMask instead.
KeyFilter provides various presets configured with the v-keyfilter directive.
In addition to the presets, a regular expression can be configured for customization.
Validation against the whole input is available with the validateOnly option enabled so that the keys are allowed only when the resulting value matches the pattern.
Refer to InputText for accessibility as KeyFilter is a built-in add-on of the InputText.