Flutter – Regex in TextFormField
Since WhitelistingTextInputFormatter is deprecated in Flutter as of 1.20, FilteringTextInputFormatter can be used: A TextInputFormatter that prevents the insertion of characters matching (or not matching) a particular pattern. Instances of filtered characters found in the new TextEditingValues will be replaced with the replacementString which defaults to the empty string. Since this formatter only removes characters … Read more