SHARE
TWEET

Untitled

a guest May 23rd, 2016 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. HTML-------------------------------
  2.  
  3. <form name="registerForm" role="form" ng-submit="inscriptionCtrl.register(inscriptionCtrl.credentials)">
  4.  
  5.     <!--  LOGIN/PASSWORD : TABLE USER -->
  6.  
  7.     <div class="form-group" ng-class="{ 'has-error': registerForm.login.$invalid && registerForm.login.$dirty }">
  8.         <label for="login">Login:</label>
  9.         <input type="text"
  10.                 class="form-control"
  11.                 id="login"
  12.                 name="login"
  13.                 ng-model="inscriptionCtrl.credentials.login"
  14.                 required/>
  15.         <div ng-messages="inscriptionCtrl.registerForm.login.$error">
  16.             <ng-message when="required">Veuillez compléter ce champ obligatoire.</ng-message>
  17.         </div>
  18.     </div>
  19.  
  20.    
  21.     <div class="form-group">
  22.         <label for="password">Password:</label>
  23.         <input type="password"
  24.                 class="form-control"
  25.                 id="password"
  26.                 name="password"
  27.                 ng-model="inscriptionCtrl.credentials.password"
  28.                 required
  29.                 minlength="6"
  30.                 pattern="([A-Z].*[a-z]|[a-z].*[A-Z])"/>
  31.         <div ng-messages="inscriptionCtrl.registerForm.password.$error">
  32.             <ng-message when="required">Veuillez compléter ce champ obligatoire.</ng-message>
  33.             <ng-message when="minlength">Ce champ doit contenir au minimum 6 caractères.</ng-message>
  34.             <ng-message when="pattern">La valeur de ce champ doit contenir au moins une majuscule et une minuscule.</ng-message>
  35.         </div>
  36.     </div>
  37.  
  38.    
  39.    
  40.    
  41.     <button type="submit" class="btn btn-primary">Submit</button>
  42.    
  43. </form>
  44.  
  45. JS----------------------------------------
  46.  
  47. var myModule = angular.module('myModule',['ngRoute','ngResource','ngMessages','pascalprecht.translate','ui.bootstrap']);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top