We need to be able to limit the user to only entering certain characters into a text field.
Is there a way to do this in the current component?
If not, is there a way to implement this?
Would this be accessibility standards compliant? Maybe not a requirement in your case Howard, however one to keep it mind for any other mates using this technique.
It might also be worth considering a masking approach, but that would depend on the specific requirement.
Internal discussion has resulted in the following suggestion:
I have asked for an article to be written to explain how to do this.
In addition, if you're careful, you can organize it so that:
This will effectively mean that the new component replaces the standard component. And all components that descend from the Text Entry widget will also inherit the new behavior.
There is a core native component now that offers that as a side-effect, the 'autotab block'.
It allows a Format regex to enforce a custom set of allowed characters, although this was not its primary intended function.