Input validator best practices

I always postponed that subject but now I’ve to implement it, so could you recommend best practices and solutions to implement validators for user inputs?

In my case, I’ve got input where the user have to introduce number (38.5, 9328, 10000.51, etc.).

I already restricted the type of the ion-input to “tel” but the user still could enter some other characters like “+” or “-” which should not be accepted.

I think, for the easiest UIX, nothing should happens when the user select not accepted characters rather than displaying him an error when he entered something wrong. Bug I’m open to both solutions :wink:

Thx in advance for the tips

Maybe use form controls regex/pattern validation or in html5 u can use pattern attribute as well