Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

222
Vistas
angularjs : validate dynamically created inputs from a component

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.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda