Input mask validation - 4.0.1 version

newbie question: How to make an input mask validation for digits with hyphens in 4.0.1 version? The number should be ###-###-##-##. Then I want to check if the number is correct (it is a Polish tax number) and I want to enable a disabled button (if it’s correct).

Edit: or better the user is allowed to input digits only and the hyphens will be added by the app.

Try this … in the pattern validation.

[0-9]{3}-[0-9]{3}-[0-9]{2}-[0-9]{2}

Brad, can you instruct me how to do that within the Wappler’s framework? Or where can I find intructions, tutorial or a video that covers this topic?

Select you form input, then under the validation rules and select Pattern. Add your pattern. Afterward you should come out with something like this:

data-rule-pattern="[0-9]{3}-[0-9]{3}-[0-9]{2}-[0-9]{2}"

Hi Dariusz,

Just as J.R. suggests above. Select your input on. the page, in the properties panel under Validation click the plus icon and select pattern. Add in the formula that I supplied early.

You will end up with something similar to (but with your pattern):

Hmm. If that were so simple. In this section I don’t have an option “Pattern” to select. Am I missing something?

Click on the ‘+’ after Validation rules. Then on ‘Text’. Select ‘Pattern’.