Javascript item validation (clears error field when user commences typing)