Handling validation on client side.