Password Validation with Rules

I am trying to create a rule or rules to ensure that a user, when changing their password (Which is contained in a table), follows the rules of "8 Characters or more, must contain one number and must contain one ucase letter." I have set a rule "len(@value)=>;8" and it works, but if I try to add additional checks "len(@value)=>;8 and @value like '[0-9]'" then I get an error stating that the rule cannot be dropped while being binded to a column. If I take off the binding then save the rule, I get the same message.

I can however, set two rules, one to validate for length and the next to validate for a number. However when I meet both criteria, I still get an error message. Is "@value like '[0-9]'" the correct syntax?

Lastly, I don't even know where to begin to validate for the ucase. Can you do a loop statement or case statement in a rule?

Oh, also, can you customize the error message returned by SQL Server when the value fails validation by the rule?



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion