Question: I want to make the AngularJS form field dirty by using JavaScript code,

Here is the HTML Code

```html
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>

<body ng-app="">

  <p>Try writing in the input field:</p>

  <form name="myForm">
    <input name="myInput" ng-model="myInput" required>
  </form>

  <p>The input's valid state is:</p>
  <h1>{{myForm.myInput.$valid}}</h1>

</body>

</html>
```

I tried using

```
document.querySelector('input[name="myInput"]').value="123",

```

clicking, focusing but none of them seems to work/override it. Please guide me on how to do that **without** using AngularJS functions and by using plain JavaScript.

I want to change the input's valid state to `true`

Answer: 
Renaming the field error to run\_error solves all the problems. It looks like the field error is reserved.
I had a similar case, the cause of your problem is that in the same elastic index, your error property is found of type object and sometimes of type values, Elasticsearch does not allow this