Prevent user from entering invalid glyph codes.

Show error notification and rollback to the previous valid code.