I have a textbox and I want to validate that the user enters only hebrew strings. How can I do that?
The obvious approach is to check the codepoints with TextBox.Text.ToCharArray(). Hebrew glyphs are codepoints 0x0580 through 0x05ff with supplementals 0xfb1d through 0xfb4f. Plus the arabic digits.
Not being a native speaker, I would however assume that Latin characters can appear when spelling trade mark names, foreign words and acronyms. Note the use of "RSS" in this page. Which put a pretty big hole in any attempt to verify the text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With