I have one input field:

```
<input type="text" name="title" ng-model="genreData.title" class="form-control"
        ng-class="{'error': addGenreForm.title.$invalid && !addGenreForm.title.$pristine}"
       placeholder="Genre name" ng-minlength="minlength" required autofocus>

```

When I succesfully submit form this input is got `class="error"` after this:

```
$scope.genreData = {};

```

How can I fix it?