Error in typed fields when ' or " is entered