Test password complexity without creating a user Is there a way to check if a particular password string passes sql server/windows password validation/complexity rules (that is be valid for creating a user) using SQL but without creating a user ?

Thx!
The enforce password policy setting for a SQL Server Login is basically a set of rules. These are as follows:


  Password Complexity
  
  Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords. When password complexity policy is enforced, new passwords must meet the following guidelines:  
  
  
  The password does not contain the account name of the user.  
  The password is at least eight characters long.  
  The password contains characters from three of the following four categories:  
  
  
  Latin uppercase letters (A through Z)  
  Latin lowercase letters (a through z)  
  Base 10 digits (0 through 9)  
  Non-alphanumeric characters such as: exclamation point (!), dollar sign ($), number sign (#), or percent (%).  
  
  
  
  Passwords can be up to 128 characters long. You should use passwords that are as long and complex as possible.


Reference: Password Policy (Microsoft Docs)

So basically you could program your web form to check for the complexity of a given password according to the above rules. 

There are a couple of questions over on Stack Overflow that summaries possibilities of using REGEX or Java to check the password complexity:


Complex password Regular expression and accepted answer
Regex to validate password strength and accepted answer


Good luck.