I have text form field to check full name of user , I want it to accept only Arabic letters, English letters and space

this code work fine

  `FilteringTextInputFormatter.allow(RegExp(r"^[\u0621-\u064Aa-zA-Z\d\-_\s]+$",))`,

but the problem when I enter any uncorrect char like : or ;

It clear Text form field directly


Solution 1: Manish

remove $ from the end of your RegExp

FilteringTextInputFormatter.allow(RegExp(r"^[\u0621-\u064Aa-zA-Z\d\-_\s]+"))