Hello,
i wrote a signin form with login/password fields. The password field is 
controled by a validation rule (ng-pattern). In the following example i 
simplified the regex  :


<div id="passwordDivId" class="form-group">
  <label for="passwordId" class="control-label">Mot de passe</label>
  <div class="">
    <input id="passwordId" type="password" class="form-control" 
ng-model="signinForm.password" name="password"
           placeholder=""
           required="true" ng-minlength="6" ng-pattern=".{6,}"/>

      <div class="help-block" ng-messages="signInForm.password.$error" 
ng-show="signInForm.password.$invalid && signInForm.password.$touched">
          <p ng-messages="required">Vous devez entrer un mot de passe</p>
          <p ng-messages="minlength">Le mot de passe doit doit être d'au moins 
6 caractères</p>
          <p ng-messages="pattern">Le mot de passe doit contenir au moins un 
chiffre, une lettre majuscule</p>
      </div>
  </div>
</div>



When the form is loaded i got the following error :

angular.js:12221 Error: [$parse:syntax] 
http://errors.angularjs.org/1.4.0/$parse/syntax?p0=.&p1=not%20a%20primary%20expression&p2=1&p3=.%7B6%2C%7D&p4=.%7B6%2C%7D
    at Error (native)
    at 
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:6:416
    at Object.q.throwError (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:207:339
)
    at Object.q.primary (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:204:337
)
    at Object.q.unary (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:203:503
)
    at Object.q.multiplicative (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:203:249
)
    at Object.q.additive (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:203:76)
    at Object.q.relational (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:202:416
)
    at Object.q.equality (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:202:241
)
    at Object.q.logicalAND (
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js:202:94) 
<input id="passwordId" type="password" class="form-control ng-pristine 
ng-untouched ng-valid" ng-model="signinForm.password" name="password" 
placeholder="" required="true" ng-minlength="6" ng-pattern=".{6,}">

Has anyone any ideas about the problem ? Is it a missing character in the 
regex ?
Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to