Advertisement
Guest User

Untitled

a guest
Jan 13th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. string Password = Request["Password"];
  2.  
  3. System.Text.RegularExpressions.Regex regex2 = new System.Text.RegularExpressions.Regex(@"/^([^0-9]*)$/");
  4. // does the string follow the regex structure?
  5. System.Text.RegularExpressions.Match match2 = regex2.Match(Password);
  6. //if yes
  7. if (match2.Success)
  8. {
  9.  
  10.  
  11. }
  12. else
  13. {
  14. passwordAlert = "password is not valid";
  15. }
  16.  
  17. }
  18.  
  19. <form class="text-center" method="post">
  20. <label>Email: <input type="text" name="email"/> </label> <p>@emailAlert</p> <br />
  21. <label>Username: <input type="text" name="username" /> </label> <p>@usernameAlert</p> <br />
  22. <label>Password: <input type="password" name="Password" /> </label> <p>@passwordAlert</p>
  23. <input type="submit" name="Submit" />
  24.  
  25.  
  26. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement