Using regular expressions.
Regular expresion that accepts unicode:
Using regular expression:
Here there are lots of complexity.
Using this code to catches the most obvious errors then user can easily rectified the errors.