Howdy, Stranger!

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


Password Validation with Rules

spindlejspindlej Member Posts: 70
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?



  • gigsvoogigsvoo Member Posts: 328
    You can write a loop inside Stored procedure to loop thru the string, use [b]Substr[/b] if you need it.

    [size=2]Neo Gigs[/size]

  • Andre YoungAndre Young USAMember Posts: 0

    ____ \ \ free ebooks and video tutorials about < MATLAB, Objective-C, C++, Ruby, Swift, Delphi, Assembly, C, Go, R, PHP, Python, Scratch, Java, C#, Visual Basic, PL/SQL, Visual Basic .NET, JavaScript, Perl Hack, Logo, F#, Bash, ML, Prolog, Apex, Lisp, D, SAS, Erlang, VBScript, Transact-SQL, Ada, COBOL, Kotlin, Scheme, Awk, Fortran, FoxPro, Dart, LabVIEW, Alice, Crystal, Julia, Rust, Scala, Lua, Clojure, ABAP /> _

Sign In or Register to comment.