I already read through a lot of questions in stackoverflow, but nothing works for me, i'm trying to validate an input that is created dynamically with ng-repeat and it's inside a component. This is my code, the input is invalid when i surpass the max-length but the error msg doesnt show.
<md-card ng-repeat="formfield in aaaaCtrl.formData.dynamicFields">
<md-card-title flex>
<md-card-content layout="column" layout-gt-sm="row" flex>
<md-card-title-text flex="none" flex-gt-sm="30">
<md-input-container class="md-block">
<label for=titre{{$index}}>Titre</label>
<input ng-model="formfield.titre" name="titre{{$index}}" type="text" md-maxlength="50"
ng-disabled="formfield.titreParDefaut.titreBloque===true" style="font-weight:bold;" required>
<div ng-messages="aaaaForm['titre' + $index].$error">
<div ng-messages-include=app/aaa/messages/messages.html></div>
</div>
</md-input-container>
</md-card-title-text>
</md-card-content>
</md-card-title>
</md-card>
The messages are centralised on the file messages.html and it already works on the normal inputs, the aaaaForm is the name of the form.