I'm new to this forge and there's not much documentation regarding how to implement the mask pattern other than providing the basic details like 9 for numeric etc etc.
So what I want to know is how do I instruct the MaskPattern assigning it that the length of the input should be limited to 250 characters that allows alphabets, numbers, and special characters without any specific format? Can anyone help me and if you know some documentations about formulation of MaskPattern so that I can study them. Thank you.
Hi Monica, if you can enter any kind of character, I believe you don't need a specific mask.
You must need to limit the input's Max Length property to the allowed # of chars.
Regards,
PZ
Hello Paulo,
I am trying to avoid this and changing the length in the database is not an option. So what do you think I can do to set this on 250 without making the coherence suggestion exist? Thanks
Hi Monica, is it a requirement to only let the user enter 250 chars? To solve this coherence suggestion, change the Max. Length to 1000. Please make sure you are doing it on the correct input.
If you can't change the database field and want to limit it to 250 chars on the input, the mask will not solve the coherence warning.
Although you should not ignore the warnings of the platform, in this case, it's not a critical issue because the user will enter 250 chars max and the field on the database supports 1000.
Hope this helps,
so coherence suggestion isn't that big of a deal? I can just proceed by changing the max length of input with 250 chars and disregard the warning? There are existing data in the used attribute that's why changing the max length of the database field is not an option and may caused error in the table if changed.
You should always aim to solve all the warnings that the platform indicates.
What I was saying is that, if you really need to restrict that input to 250 chars, and if you cannot change the corresponding attribute on the database to match the 250 chars instead of 1000, then, it won't be a critical issue, because the user will be able to enter fewer characters (250) compared to 1000 allowed.
Also, the InputMask will not resolve that coherence suggestion.
Alright. Thanks Paulo for that insight. I might find another way to set the max-length of the input without changing the max-length setting in outsystems
Why don't you use the regular input widget instead? You can set max input length there and you have no constraints in terms of format.
Because it will result to coherence suggestion which I'm trying to avoid. The length of the variable on the database is already set to 1000 and I can't change it. So I am required by my lead to implement the InputMask component to restrict the input to 250 characters.
Hi Monica,
You can set the # of chars allowed by the mask like this:
9{1,50}
This will allow the user to enter 50 numeric digits.
how can I instruct the maskpattern that it can accept any character, digit, and special characters as long as the legnth will be 250 chars? I don't understand the formulation and format of MaskPattern
Here's an example: