seperating validator so it can be used independently
tweaking example code
reserved words bug, quotes bug, ie fixes